Looking for more granular permissions in sub-forums

General Discussion
  • So we've got a forum that is organized into "countries" of sorts, where there is a specific person that controls each "country" (for context, this is tied into a game).

    We want to allow each controlling person to have moderation rights over their respective sub-forum but I've realized that simply making them a moderator of a sub-forum also allows them to moderate any user that can view said forum. That includes too much moderation power over users for the application.

    Is there a way for us to assign just post/sub forum moderation without including the user moderation portion (viewing user account info, etc.)?

    I see in the permissions area I can set specific people to moderate a sub forum but that includes user moderation.

  • Viewing user info was added as a separate privilege recently https://github.com/NodeBB/NodeBB/pull/7859 by @oplik0 maybe that is what you want?

  • @baris Oh I think it might be! I'll have to take a look at it, thanks. Would that be in the 1.12.2 general release?

  • The only current milestone on GitHub is 1.13.0, so I'd assume that it will wait for that release.

    If you need it now you can manually modify some NodeBB files:

    • in src/middleware/user.js modify line 135 from
    					user.isModeratorOfAnyCategory(req.uid, next);
    

    to

    					user.isAdminOrGlobalMod(req.uid, next);
    
    • In src/socket.io/posts/tools.js change line 75 from
    				if (!results.isAdmin && !results.isGlobalMod && !results.isModerator) {
    

    to

    				if (!results.isAdmin && !results.isGlobalMod) {
    
    • in src/controllers/accounts/helpers.js change line 144 from
    			if (isAdmin || isSelf || ((isGlobalModerator || isModerator) && !results.isTargetAdmin)) {
    

    to

    			if (isAdmin || isSelf || (isGlobalModerator && !results.isTargetAdmin)) {
    

    That should remove all privileges from category moderators while leaving them for administrators and global moderators.

    I'm really looking forward to 1.13.0 though, as I've not only added two things that will be useful for me (not to mention useful changes by NodeBB staff and other contributors. And the refactor), but also because I use the master branch for my dev enviroment the plugin I'm currently writing uses async/await where 1.12.x doesn't support it yet, so to avoid rewriting it twice I had to use util.promisify to make current callback based functions work like async ones 😄

    EDIT: btw. It seems like 1.13.0 might be close as there are no issues left assigned to this milestone. So while I'm not NodeBB staff and can't tell you when the refactor will be finished and when they think there are enough changes for an update to 1.13 I doubt it's really far away 🙂


Suggested Topics


  • 1 Votes
    1 Posts
    407 Views

  • 0 Votes
    1 Posts
    516 Views

  • General Discussion
    0 Votes
    2 Posts
    2748 Views

  • General Discussion
    0 Votes
    6 Posts
    1553 Views

  • 0 Votes
    4 Posts
    11055 Views

| | | |