Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 01:37 pm EST
Geeklog Forums
File Management admin link should not show up
Status: Banned
gtgillis
Forum User
Full Member
Registered: 11/05/03
Posts: 121
I have a registered user that I gave Story Admin rights. When this user logs in he can see the admin menu containing links for Submissions and Stories. When he clicks on Submissions he sees the Stories and Logout icons and links but also present is the icon and link for File Management.
If he clicks on the link he sees an error that he has no access. I have not granted him filemgmt Admin rights.
How can I get rid of the link and icon when he clicks Submissions?
If he clicks on the link he sees an error that he has no access. I have not granted him filemgmt Admin rights.
How can I get rid of the link and icon when he clicks Submissions?
12
10
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Looks like the File Management plugin is missing a permission check there ...
In the plugin's functionc.inc file, find this:
{
global $LANG_FILEMGMT, $_CONF;
return array($LANG_FILEMGMT['plugin_name'],$_CONF['site_admin_url'] . '/plugins/filemgmt/index.php',$_CONF['site_url'] . '/filemgmt/images/filemgmt.gif');
}
and add the permission check (which you can copy from the function plugin_getuseroption_filemgmt just below that function):
{
global $LANG_FILEMGMT, $_CONF;
if (SEC_hasRights('filemgmt.upload')) {
return array($LANG_FILEMGMT['plugin_name'],$_CONF['site_admin_url'] . '/plugins/filemgmt/index.php',$_CONF['site_url'] . '/filemgmt/images/filemgmt.gif');
}
}
That should fix it.
bye, Dirk
In the plugin's functionc.inc file, find this:
Text Formatted Code
function plugin_cclabel_filemgmt(){
global $LANG_FILEMGMT, $_CONF;
return array($LANG_FILEMGMT['plugin_name'],$_CONF['site_admin_url'] . '/plugins/filemgmt/index.php',$_CONF['site_url'] . '/filemgmt/images/filemgmt.gif');
}
and add the permission check (which you can copy from the function plugin_getuseroption_filemgmt just below that function):
Text Formatted Code
function plugin_cclabel_filemgmt(){
global $LANG_FILEMGMT, $_CONF;
if (SEC_hasRights('filemgmt.upload')) {
return array($LANG_FILEMGMT['plugin_name'],$_CONF['site_admin_url'] . '/plugins/filemgmt/index.php',$_CONF['site_url'] . '/filemgmt/images/filemgmt.gif');
}
}
That should fix it.
bye, Dirk
10
11
Quote
Status: Banned
gtgillis
Forum User
Full Member
Registered: 11/05/03
Posts: 121
Thanks.
I had to change it to filemgmt.edit since all logged in users can upload.
Here is the code that worked
function plugin_cclabel_filemgmt()
{
global $LANG_FILEMGMT, $_CONF;
if (SEC_hasRights('filemgmt.edit')) {
return array($LANG_FILEMGMT['plugin_name'],$_CONF['site_admin_url'] . '/plugins/filemgmt/index.php',$_CONF['site_url'] . '/filemgmt/images/filemgmt.gif');
}
}
Thanks for the help.
Regards,
Greg
I had to change it to filemgmt.edit since all logged in users can upload.
Here is the code that worked
Text Formatted Code
function plugin_cclabel_filemgmt()
{
global $LANG_FILEMGMT, $_CONF;
if (SEC_hasRights('filemgmt.edit')) {
return array($LANG_FILEMGMT['plugin_name'],$_CONF['site_admin_url'] . '/plugins/filemgmt/index.php',$_CONF['site_url'] . '/filemgmt/images/filemgmt.gif');
}
}
Thanks for the help.
Regards,
Greg
13
10
Quote
All times are EST. The time is now 01:37 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content