change permission setting from number to dropdown with names, thanks some_random_guy

and some related css tweak and faq page update
jschan
Thomas Lynch 3 years ago
parent 5adecf8195
commit f606cd186a
  1. 8
      gulp/res/css/style.css
  2. 1
      gulpfile.js
  3. 1
      helpers/render.js
  4. 1
      server.js
  5. 6
      views/custompages/faq.pug
  6. 2
      views/pages/account.pug
  7. 18
      views/pages/globalmanageaccounts.pug

@ -1107,6 +1107,14 @@ input[type="button"], input[type="range"], input[type="number"], input[type="tex
border-radius: 0px;
}
.nogrow * {
flex-grow: 0;
}
.nogrow input[type="submit"] {
width: min-content;
}
textarea {
max-height: 100%;
max-width: 100%;

@ -352,6 +352,7 @@ async function custompages() {
])
.pipe(gulppug({
locals: {
authLevelNames: ['Admin', 'Global Staff', 'Global Board Owner', 'Global Board Mod', 'Regular User'],
early404Fraction: config.get.early404Fraction,
early404Replies: config.get.early404Replies,
meta: config.get.meta,

@ -23,6 +23,7 @@ const updateLocals = () => {
lockWait, globalLimits, boardDefaults, cacheTemplates,
meta, enableWebring, captchaOptions, globalAnnouncement } = config.get);
renderLocals = {
authLevelNames: ['Admin', 'Global Staff', 'Global Board Owner', 'Global Board Mod', 'Regular User'],
cache: cacheTemplates,
meta,
commit,

@ -71,6 +71,7 @@ const config = require(__dirname+'/config.js')
app.cache = {};
app[cacheTemplates === true ? 'enable' : 'disable']('view cache');
//default settings
app.locals.authLevelNames = ['Admin', 'Global Staff', 'Global Board Owner', 'Global Board Mod', 'Regular User'];
app.locals.enableUserAccountCreation = enableUserAccountCreation;
app.locals.enableUserBoardCreation = enableUserBoardCreation;
app.locals.defaultTheme = boardDefaults.theme;

@ -282,9 +282,9 @@ block content
li Board owner: Same as board moderator
li Board moderator: All below, move/merge, ban, delete-by-ip, sticky/sage/lock/cycle
li Regular user: Reports, and post spoiler/delete/unlink if the board has them enabled
| Administrators have the ability to assign a permission level directly to users through the global management page. Typically a user is level 4 (regular user), 1 (global staff) or 0 (administrator).
| Level 2 and 3 are usually only applicable to users when on a board they are owner or moderator. However, level 2 or 3 can be assigned manually to create global board owners or global board moderators
| who have board owner or moderation permissions on all boards, but without access to the global moderation interfaces. If assigning global board owners (level 2), they will have access to the board settings
| Administrators can set account types for users on the global management accounts page. Normally only Admin (level 0), Global Staff (level 1) and Regular User (level 4) are assigned here.
| Level 2 or 3 permission is handled internally for users on boards they own or moderate, while their account remains listed as "Regular User". However admins can manually assign Global Board Owner (level 2) and Global Board Mod (level 3)
| to grant an account board owner or moderation permissions on all boards, but without access to the global moderation interfaces. If assigning Global Board Owner (level 2), they will have access to the board settings
| and the ability to reassign board owners.
.table-container.flex-center.mv-5
.anchor#antispam

@ -6,7 +6,7 @@ block head
block content
.board-header
h1.board-title Welcome, #{user.username}
h4.board-description Auth level: #{user.authLevel}
h4.board-description Account type: #{authLevelNames[user.authLevel]}
br
hr(size=1)
h4.no-m-p General:

@ -22,14 +22,14 @@ block content
input(type='submit', value='Filter')
h4.no-m-p Accounts:
if accounts && accounts.length > 0
form.form-post(action=`/forms/global/editaccounts` method='POST' enctype='application/x-www-form-urlencoded')
form.form-post.nogrow(action=`/forms/global/editaccounts` method='POST' enctype='application/x-www-form-urlencoded')
input(type='hidden' name='_csrf' value=csrf)
.table-container.flex-left
table.fw
table
tr
th
th Username
th Auth Level
th Account Type
th Own Boards
th Mod Boards
th Last Active
@ -37,7 +37,7 @@ block content
tr
td: input(type='checkbox', name='checkedaccounts' value=account._id)
td #{account._id}
td #{account.authLevel}
td #{authLevelNames[account.authLevel]}
td
if account.ownedBoards.length > 0
for b in account.ownedBoards
@ -60,8 +60,14 @@ block content
.pages.mv-5
include ../includes/pages.pug
.row
.label Set Auth Level
input(type='number' name='auth_level')
.label Set Account Type
select(name='auth_level')
option(value='')
option(value='0') Admin
option(value='1') Global Staff
option(value='2') Global Board Owner
option(value='3') Global Mod
option(value='4') Regular User
.row
.label Delete Accounts
label.postform-style.ph-5

Loading…
Cancel
Save