Announcement

Collapse
No announcement yet.

mass permissions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mass permissions

    Quick question ...

    What would be the quickest way to give all moderators user banning permissions? currently none have it. I think i'm just tired but can't see an easy way to do it other than quickly adding a new usergroup with banning permissions then copying those to the moderator group with the duplication tool.

    Thanks

  • #2
    The ability to ban users isn't a group permission, it's a moderator permission. Super moderators are granted all moderator permissions by default. Regular forum moderators must be granted that permission in your:

    Admin CP -> Forums & Moderators -> Forum Manager

    You can select moderators to edit from the menus on the right.

    That moderator permission is stored using a binary scheme in a single field along with the other moderator permissions, so there is no query to change that one permission. But you can still run a query to set all of the permissions to be the same for all moderators.

    To get the stored value for the permissions for one of your moderators, run this query on your database:

    SELECT permissions FROM moderator WHERE userid = X AND forumid = Y

    Where X is the userid of the moderator and Y is the forumid of the forum which the user moderates. If you use table prefixes then you need to change moderator to include the prefix.

    That query will return a number. You need to use that number in the next query:

    UPDATE moderator SET permissions = Z

    Where Z is the number you got from the first query. Keep table prefixes in mind. Now all regular forum moderators will have the same permissions.

    You should backup before running these queries.

    You can run these queries in your:

    Admin CP -> Import & Maintenance -> Execute SQL Query

    Make sure your userid is entered into your includes/config.php file so you have permission to run queries:

    // ****** USERS WITH QUERY RUNNING PERMISSIONS ******
    // The users specified here will be allowed to run queries from the control panel.
    // See the above entries for more information on the format.
    // Please note that the ability to run queries is quite powerful. You may wish
    // to remove all user IDs from this list for security reasons.
    $canrunqueries = '';

    Comment


    • #3
      thanks for the reply, i'd already done basically the same thing, just gave one mod banning permissions, viewed the new value in the table then ran update moderator set permissions='xxx';

      would be a useful future feature addition though, i can think of a few examples where you might want to add/remove a permission from one group

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X