Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Permission Viewer
#1
Overview

Permission viewer can be used to easily figure out what permissions your users have.  You are able to see both their general permissions and forum permissions.  You also are able to view permissions of guests in case you need to verify where something might not be correct.

Any default permissions use the language system that MyBB has.  If any fields were added to your mybb_usergroups table, it will list the name of the field allowing you to make sure permissions are working as expected on additional plugins.  I also went a step further and made it so instead of 0s and 1s you will see Yes and No.  On certain permissions like how many pms a user can have, it will say Unlimited if 0 is the value.

Installation:
1) Upload the /inc/plugins/permissionviewer.php file to your /inc/plugins directory.
2) Upload the /admin/modules/tools/permissionviewer.php file to your /admin/modules/tools folder.

Usage
1) Log into the Admin CP.
2) Go to the Tools Tab.
3) Click on View Permissions.

download link: http://community.mybb.com/mods.php?action=view&pid=270

For more documentation, including making plugins use language variables in general permissions, please visit the project on Github.

Important
This plugin works fully with the PHP 7 series without any changes. If you are running the PHP 5 series you must add this after line 171 of admin/modules/tools/permissionviewer.php

$prefixes = array();
Reply
#2
Seems useful, thanks.
Reply
#3
Next update I will make a feature that attempts to load more language for custom fields. I'll end up leaving instructions for plugin authors to do this.
Reply
#4
I uploaded a new build that incorporates the load additional language feature.
Reply
#5
Seems a little dirty, why not adding a hook instead?
Reply
#6
If I used a hook they would need to use a bunch of control statements which makes their plugin require more space and increases the chances of an error. Its easier when a new plugin is being built to just keep to the standard language then no additional variables need to be created. It took me only a couple minutes to modify the copy of My Profile to work with it.

I could add a hook where developers could use that instead if they find that easier for the next release. The next release I will also make it so the $groupzerogreater array can be modified.
Reply
#7
New build is up. It adds a couple hooks and changes the way forum permissions are calculated. As long as you keep your forum up to date, it will run correctly. You can also see if a forum is active or if the forum is open since that will affect permissions on the front end. It still calculates without taking that into consideration in case you want to see what their permissions would be if you made the forum active.
Reply
#8
Very useful, thanks
Reply
#9
The Plugin System should allow plugins to be only active for the ACP, what is the real reason to load this on every forum page load? Just an idea crossing my mind.

Thanks!
Reply
#10
(2014-10-28, 12:37 AM)Omar G. Wrote: The Plugin System should allow plugins to be only active for the ACP, what is the real reason to load this on every forum page load? Just an idea crossing my mind.

Thanks!

I'm not sure what you mean here. I don't use any front end hooks, only ACP ones.

Anyway, I uploaded a new build that shows moderator and admin permissions. On Github I also added a page that lists the hooks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)