Page 1 of 1

Hide entries in Admin Panel

Posted: Wed May 27, 2009 12:20 pm
by korpirkor
Hi !
I am creating account for editor of CMS MS but even after change "Group Permissions", there are some unnecessary elements which i need to hide.

I've marked it on this screenshot:
http://const.pl/pliki/admin.jpg

Where should I start ? Which files are responsible for this ?

Thanks, best regards, Czarek

Re: Hide entries in Admin Panel

Posted: Wed May 27, 2009 2:00 pm
by korpirkor
I have done it by myself :)


SQL:
INSERT INTO cms_permissions (permission_id, permission_name, permission_text, create_date, modified_date) VALUES (NUMBER (I don't know how to use auto-increment), 'Show Unnecessary', 'Show Unnecessary', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)

----------------
EDIT:
/lib/classes/class.admintheme.inc.php
----------------
After:
(isset($this->sectionCount['extensions']) && $this->sectionCount['extensions'] > 0);

ADD:
$this->perms['contrainPerms'] = check_permission($this->userid, 'Show Unnecessary');
--------------------

EXAMPLE:
    'dashboard'=>array('url'=>'dashboard.php','parent'=>'main',
       'title'=>$this->FixSpaces(lang('dashboard')),
       'description'=>'','show_in_menu'=>true),
REPLACE BY:
    'dashboard'=>array('url'=>'dashboard.php','parent'=>'main',
       'title'=>$this->FixSpaces(lang('dashboard')),
       'description'=>'','show_in_menu'=>$this->HasPerm('contrainPerms')),