MyBB Community Forums

Full Version: Staff Hierarchy Permissions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Current version is 2.5
***It is highly recommended you upgrade to version 2.5 of this plugin.***

(Note: Information below may be slightly outdated...)

Original Description (See features & version history for up-to-date info)
----------------------------------------------------------------------------------------------------------
With two changes to the default warnings.php, this plugin will better handle the permissions for the warning system by letting you set-up a hierarchy of group ids from most powerful to least powerful. If the user the person is trying to warn has a lower rank (ie, closer to the left) than the warner, permission will be denied.

Installation instructions
---------------------------------------
See install.txt

Upgrading from v1.2 or lower to v1.3 or later (according to in-admincp number)
-------------------------------------------------------------------------------------------------------------------
1. Uninstall the old warn permissions plugin
2. Delete warn_permissions.php from MYBB_ROOT/inc/pluginst
3. Upload the contents of the Upload Folder to your forum root and reinstall

Upgrading from 1.3, 1.4, or 1.6 Dev to 2.0
------------------------------------------------------------
1. Not sure if this is neccessary, but I changed some of the info (setting info too) to be in a separate language file instead as plain text.
2. Uninstall the plugin.
3. Reinstall the plugin.

Upgrading from 1.x or 2.0 to 2.1
------------------------------------------------
1. This is mandatory as while I haven't changed the settings themselves, I've changed the way they are used and the descriptive text.
2. Upload ALL the files in the Upload folder to your mybb root
3. Reinstall the plugin
4. Follow the new directions given.

Same instructions for 1.x, 2.0, 2.1 to 2.2; note that two new settings have been added.

Features
---------------
1. Set-up a chain-of-command, so people can't warn users more powerful than them.
2. Supports both primary and additional groups.
3. Restrictions added to bans -- both lifting and execution
4. Restrictions added to revokation of warnings
5. Restrictions added to editting and deletion of posts
6. Restrictions added to thread deletion (LOCAL moderator permissions override)
7. Restrictions added to the editting of users in admincp.
8. Super Admins override hierarchy restrictions.
9. Logging of permission denial
10. Support for groups equal in power
11. Control over unlocking threads and replying to locked threads; these are optional. Read ChangeLog.txt for more detailed info.

Support & Feedback
--------------------------------
1. This Thread Only!!!!
2. Suggestions can be posted here or on the appropriate link on the mods site. Same applies to bugs.
3. I WILL IGNORE AND DELETE ALL BUG, SUPPORT, AND SUGGESTION PMS THAT DO NOT FOLLOW THE RULES STATED RIGHT HERE (unless I specifically pm you asking for such)!!!!!!

Addendum
--------------------
1. More info found inside readme.txt

Notes
-----------
Need someone to verify that additional groups are checked correctly.

Mod Link
----------
http://community.mybb.com/mods.php?action=view&pid=391

Version History
----------------


Version 1.0
--------------
 - Initial Release
 - Set up a comma-separated list of gids from most powerful to least powerful (hierarchy restrictions)
 - Applied hierarchy restrictions to the issuing of warnings
 - Named warn_permissions, but never seen by public

Version 1.2
-----------
 - Added hierarchy restrictions to issuing and lifting of bans.
 - Lifting of bans was bugged (based off banned_user rather than banner)
 - Named warn_permissions, but never seen by public

Version 1.2b
------------
 - Minor Fix --- Put plugin file in Upload/inc instead of Upload/inc/plugins
 - Named warn_permissions
 - First public release

Version 1.3
-----------
 - Fixed bug in lifting of bans
 - Added language files
 - Differentt error messages for different actions
 - Added hierarchy restrictions to revokation of warnings
 - Fixed bug with not having rebuild_settings() in _uninstall() function
 - Renamed everything to Staff Hierarchy Permissions (Please read the upgrade instructions in this thread)

Version 1.3b
---------------
- Minor fixes, updating information. If you have v1.3 already, updating to 1.3b would be a complete waste of time.

Version 1.4
-----------------
- Added hierarchy restrictions to edit/deletion of posts
- Added hierarchy restrictions to deletion of threads
+ Having a local moderator with permission to delete threads pernamently will override the hierarchy restrictions. This is intended and will not be changed. I will ignore/dismiss/reject any bug reports that find this as a bug.

V1.6 Dev
----------------------
- DO NOT USE ON A LIVE FORUM. This is a DEVELOPMENT / DEBUG Build. I will not provide support to anyone who uses version 1.6 Dev on a live forum.
- EDIT: This build is safe

Version 2.0
--------------------------
- Version jump represents the fact I reformatted the code for consistency.
- Settings & Info now use language file
- Using admin redirects now in admincp
- Quick Edit should work properly (REPORT BUGS HERE -- HAVEN'T BEEN ABLE TO TEST) - Hierarchy Restrictions should apply
- Super Admins should now override hierarchy restrictions; tell me if this ain't the case (should've included this in the original release)
- The admincp no longer lets you edit yourself or anyone of equal or higher power (to prevent unfairly giving one extra power)

I'm getting tired of writing a change log / version history like 3 or 4 times (in ChangeLog.txt, on the changelog field, adding the changes to my feature lists, adding it at the bottom of this post), so therefore, I shall no longer write the version history at the end of the post.
Approved, but in your next build, remember to use the function rebuild_settings in your _uninstall function also.
(2015-02-15, 05:42 PM)dragonexpert Wrote: [ -> ]Approved, but in your next build, remember to use the function rebuild_settings in your _uninstall function also.

Yeah, thank you, I got a few more plans and am open to suggestions…… I'm thinking about a name change too.

EDIT: I went through with the name change, added a feature, added language files, and fixed a few bugs including the aforementioned one. I have submitted version 1.3 of this plugin to the mods site. If you've already downloaded and used this plugin, please read the upgrade instructions in this thread (I forgot to include them in my plugin release build..
Bumping -- Its been awhile (atleast 24 hours since last post), and I don't think people realize the potential of this plugin. Plus, I've updated it quite some since initial post. (Please reread initial post and take a second look).

If you questions, comments, concerns, bugs, or suggestions, you are MORE than welcome to post them in this thread.
This is a good plugin, not had a chance to install it on my forums yet but I will be.
How do I allow editing your own profile?
Thanks!
(2015-10-03, 03:23 AM)xunofar Wrote: [ -> ]How do I allow editing your own profile?
Thanks!

From the admin cp? There's no separate option for that, though being a super admin should bypass the restriction. Otherwise, it would be too easy to edit your usergroup to give yourself more power. This plugin does not affect the user cp, and I'm pretty sure you can edit yourself via the modcp.
can you restrict the ACP using this? Say allowing only admins who moderate to change those forums only?
No, I have a section labelled features in op that basically summarizes what this does. It only restricts a few things about acp: profile editting and user banning.
Bump -- Updated to version 2.2 which comes with a few new features and fixes one somewhat minor loophole in the admincp.
Pages: 1 2