How to hide "Extensions" menu in admin panel?
Posted: Mon Sep 18, 2006 9:46 pm
Hi. I would like to set up CMS Made Simple for a client, but I only want them to be able to administer "News" items. I purposely want to remove as much as possible from the admin panel for the client because they are not very computer savvy and any extra things to click on and look at will only confuse them. So, I have removed all permissions except "Modify News" from the Editors group, and when a user in the Editors group logs in to the Admin panel, ALMOST everything I don't want them to see is hidden (which is great). The only exception is the "Extensions" block is still showing up (in the menu and on the 'main' listing page) with the sub-items "Tags", "Events", and "Search"
I looked at the php code, and found something in the "SetAggregatePermissions()" function of the "lib/classes/class.admintheme.inc.php" file:
It appears that although the user doesn't have 'codeBlockPerms' or 'modulePerms', this is getting overridden by the fact that $this->sectionCount['extensions'] is greater than 0.
I can of course make an ugly hack to this code to "fix" this, but I do not understand the overall implications. Why is it that if sectionCount is greater than 0 that the block is shown anyway? Perhaps the problem is that the "Tags", "Events", and "Search" extensions don't have their own permission settings -- so if somehow permission settings for these extensions were added to the admin panel (so I could check or uncheck them), then the code would do as I like?
Any guidance on this issue would be greatly appreciated. Thanks alot!
-Jordan Lev
Portland, Oregon, USA
I looked at the php code, and found something in the "SetAggregatePermissions()" function of the "lib/classes/class.admintheme.inc.php" file:
Code: Select all
$this->perms['extensionsPerms'] = $this->perms['codeBlockPerms'] |
$this->perms['modulePerms'] |
(isset($this->sectionCount['extensions']) && $this->sectionCount['extensions'] > 0);
I can of course make an ugly hack to this code to "fix" this, but I do not understand the overall implications. Why is it that if sectionCount is greater than 0 that the block is shown anyway? Perhaps the problem is that the "Tags", "Events", and "Search" extensions don't have their own permission settings -- so if somehow permission settings for these extensions were added to the admin panel (so I could check or uncheck them), then the code would do as I like?
Any guidance on this issue would be greatly appreciated. Thanks alot!
-Jordan Lev
Portland, Oregon, USA