90 Commits (5a40d26b44cbea4e1468b2615026f7b915ceb659)

Author SHA1 Message Date
Julian Lam a716a5529c
feat: more discrete commit-on-save instead of commit-on-change w/ confirm modals (#8541)
* feat: privileges save button, #8537, WIP

* fix: disable firefox autocomplete on privilege form fields

* feat: closes #8537 privilege changes commit on save

- new language strings for confirmation and success modals/toasts
- indeterminate privilege handling (/cc @psychobunny)
- added new discard button
- both discard and save buttons now have confirmation dialogs

* fix(tests): remove duplicate template helper test

* fix(tests): broken template helper test

* feat: confirm dialogs for all privilege copy actions

Also, ability to add user to a privilege table without needing
to refresh the privilege table.

* feat: group row addition w/o table refresh

breaking: helpers.getUserPrivileges and helpers.getGroupPrivileges
no longer make socket calls to the following hooks:

- filter:privileges.list, filter:privileges.admin.list,
  filter:privileges.global.list, filter:privileges.groups.list,
  filter:privileges.admin.groups.list,
  filter:privileges.gloval.groups.list

The filters are still called, but done before the helper method
is called, and the results are passed in instead. This change
should only affect you if you directly call the helper methods,
otherwise the change is transparent.

* fix: stale ajaxify data on privilege category switch

* fix: implicit privileges not showing for user privs

* fix: groups, not group, also fix tests

* fix(tests): again

* fix: wrong tpl rendered when adding group to global priv table
5 years ago
Julian Lam a82e9bd7f6
feat: privileges for Admin Control Panel (#8355)
* feat: acp privileges (WIP)

* fix: restore global privilege hooks

* refactor: using cid 0 in admin privs

* fix: no need for zebrastripe-reset

* feat: manage:categories privilege WIP

* feat: renamed prefix to admin:, settigns and dashboard privs

* fix: nofocus on acp privs group find modal

* refactor: privileges.x.get() to not used hardcoded privs

* fix: crash if unable to get latest version

* feat: setting acp priv

* Revert "fix: crash if unable to get latest version"

This reverts commit afdb235f48eb0072d88de45f3a1e0151281095b3.

* feat: user/privilege acp privs

* fix: category selector in manage/privileges

* fix: guests potentially becoming admins

* fix: bug in setting admin privs

* fix: some last minute things + api docs

* fix: some more last minute fixes
5 years ago
Barış Soner Uşaklı ec5582b53c
feat: add privilege give/rescind hooks (#8336)
* feat: add privilege give/rescind hooks

action:privileges.categories.give/rescind
action:privileges.global.give/rescind

breaking change, privileges.categories.give/rescind and privileges.global.give/rescind use full privilege name for groups ie `groups:find` instead of `find`

* fix: tests, privileges renamed
5 years ago
Barış Soner Uşaklı 9969dd6335 fix: use view_deleted when filtering, closes #8137 5 years ago
Barış Soner Uşaklı 310c6fd33f
properly filter /unread /recent /popular /top (#7927)
* feat: add failing test for pagination

* feat: test

* fix: redis tests

* refactor: remove logs

* fix: add new test

* feat: make sortedSetRangeByScore work with keys on redis

* fix: hardcoded set name

* feat: show topics from readable categories on recent/popular/top

* feat: rewrite unread topics

respect watched categories and followed topics

* fix: term + watched
6 years ago
Barış Soner Uşaklı faccb191ec feat: #7743, privileges 6 years ago
Barış Soner Uşaklı 035f624758
Remove implicit mod privs. closes #6345 (#7648)
* feat: add upgrade script to give mods privs

* feat: give all privileges when making a moderator

* feat: remove implicit privs

* feat: give global mods default privs

* feat: more priv fixes

* feat: use lodash

* fix: remove implicit mod priv from topic delete

* fix: more privs

* fix: posts.canEdit

* fix: canDelete and canEdit

* fix: tests, remove console.log

* feat: shorter functions

* feat: add tests

* fix: uids

* fix: redis random test fail
6 years ago
Julian Lam df6f75eb05 fix: #7298 privilege header misalignment 6 years ago
Barış Soner Uşaklı 54c127d1b2 feat: allow array results 6 years ago
Peter Jaszkowiak ba619c7ec8 style(eslint): match operator-linebreak preferences 6 years ago
Barış Soner Uşaklı 69bb3293ee misc fixes
handle spider uids properly
6 years ago
renovate[bot] 64b9dabff8 chore(deps): update dependency eslint-config-airbnb-base to v13 (#6599)
* chore(deps): update dependency eslint-config-airbnb-base to v13

* chore: #6599, linting 😬
7 years ago
Barış Soner Uşaklı ee2f9e9434 remove some parseInts 7 years ago
Barış Soner Uşaklı ff6c6a54c1 make upload permissions global
give upload image permission to registered users on install
add global privileges to app.user.privileges for client side use
7 years ago
Baris Usakli 242dc41aca move privileges to same page 7 years ago
Barış Soner Uşaklı 2185480c4e switch to eachSeries 8 years ago
Barış Soner Uşaklı e9f8cdc7f0 closes #5855 8 years ago
Barış Soner Uşaklı 38af651072 use _.uniq 8 years ago
Barış Soner Uşaklı c36f25f761 switch .filter to uniq 8 years ago
Barış Soner Uşaklı d65f494c6d closes #5127 8 years ago
Baris Usakli 4903585d88 refactor userPrivileges and groupPrivileges 8 years ago
Barış Soner Uşaklı 59b1d8fbae Merge pull request #5710 from NodeBB/_lodash
Switch from underscore to lodash
8 years ago
Peter Jaszkowiak d4e7db45b7 Use zipObject, more test-related ignores 8 years ago
Barış Soner Uşaklı 937d6dd4df fix acp privilege page not loading 8 years ago
Peter Jaszkowiak 3c2d4fe649 Switch from underscore to lodash 8 years ago
Barış Soner Uşaklı 8db193ff55 privileges style changes 8 years ago
barisusakli 324e5be7bd privileges tests 8 years ago
barisusakli 1bee91fa22 groups refactor 8 years ago
Peter Jaszkowiak 896c8c7343 ESlint object-curly-spacing 8 years ago
Peter Jaszkowiak 3b0dd2d1ef ESlint padded-blocks 8 years ago
Peter Jaszkowiak feb8405f95 ESlint eol-last 8 years ago
Peter Jaszkowiak 604358ecc4 ESlint keyword-spacing, no-multi-spaces 8 years ago
Peter Jaszkowiak 2e031f3759 ESlint comma-spacing 8 years ago
Peter Jaszkowiak 3361a72725 ESlint no-plusplus
and no-empty, space-unary-ops
8 years ago
Peter Jaszkowiak bc1d70c126 ESlint comma-dangle 8 years ago
Sergii Paryzhskyi e515b791da Fix eslint rules (#5117)
* Fix semi linter rule

* Fix semi-spacing linter rule

* Fix no-undef-init linter rule

* Fix space-before-blocks linter rule
9 years ago
HeeL 4a3c31b2dc Fix space-before-function-paren linter rule 9 years ago
HeeL 3fa1c1f927 Fix space-infix-ops linter rule 9 years ago
barisusakli 07852862f5 improve helpers.isUserAllowedTo
ability to pass in an array of privileges and a single cid
9 years ago
barisusakli b933385b76 partially revert fa9f1ac7fe
extending module.exports instead of overwriting fixes the issue
9 years ago
barisusakli fa9f1ac7fe fix dependency errors 9 years ago
barisusakli 6d946425fa fix tests, circular deps 9 years ago
Ben Lubar f62da5c4e9 see NodeBB/NodeBB#4909 9 years ago
Ben Lubar 26df552d55 Add edit, delete, and topics:delete permissions for users acting on their own posts 9 years ago
barisusakli d2cbd7e6dc new priv for uploads 9 years ago
barisusakli 09ce48ad33 fix privs 9 years ago
barisusakli 8f594de4c2 fix privs 9 years ago
barisusakli c969870cb6 removed dupe privilegeList, added missing privilege to copyPrivsFrom 9 years ago
psychobunny b37b083a4d new privilege: Access Topic
differentiation between Access Category and Access Topic, ie. allows you
to see the category view but not actually enter the topic itself
9 years ago
barisusakli 5e5e46e95f closes #4499 9 years ago