Restrict 'Moderator' access to panel?

This add-on will allow you to give "moderators" access to manage users, and theire permissions, admin accounts are protected

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Restrict 'Moderator' access to panel?

Postby rookie7 on Sun 20. Jul, 2003 09:55

This maybe a bit weird but...I just LOVE this mod and I do not want to install any other mods that claim to do the same. So...installing a Super Moderator or Jr Admin mod is out of the question.

I want to set up two moderator groups:

1. Moderator: This is the default phpBB moderator and is moderator of only the individual forums. I do not want them to have access to the moderator panel that this modification gives (permission and all...not just hiding the link from them).

2. Super Moderator: This is a global moderator group that has moderation rights in all forums. I can do this by going to forum permission of this group and set it to "Is Moderator." I want this group to have access to the moderator panel that this modification gives. Right now, this is only a special rank...but...I think it would be safer to make it a group by add some fields into the database (like what the Super Mod modification does).

I think it can be done. I just don't have the php knowledge to do it! Would you please, in your spare time, see if you can code this? A million thanks in advance for attempting!
rookie7
Poster
Poster
 
Posts: 12
Joined: Sun 27. Apr, 2003 16:19

Postby kooky on Mon 21. Jul, 2003 00:47

For what you want, it should create a new ID like the Super moderator Mod does :?

Maybe it could have other solutions, but that will ask to hard codded your phpBB
kooky
brilliant supporter
 
Posts: 1329
Joined: Tue 31. Dec, 2002 17:52
Location: Au pays des rêves

Postby rookie7 on Mon 21. Jul, 2003 04:55

Thank you for replying kooky. I'm using version 1.0.1, and I'm just wondering...this mod asks to change the page_tail.php to this

Code: Select all
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : (( $userdata['user_level'] == MOD ) ? '<a href="modcp/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Mod_CP'] . '</a><br /><br />' : '');


Can't we just create another level called "SUP_MOD" and change the $userdata['user_level'] == MOD to $userdata['user_level'] == SUP_MOD ?

I tried that but...didn't work. How can I add another level (SUP_MOD) kooky??

I went into constant.php and add this code

Code: Select all
define('SUP_MOD', 3);
thinking that would add another user_level for me but...it didn't.

If you have the time and patience, please help me out. Thanks so much kooky! This Super Moderator Hack by JRawly might be useful. Once again, thank you for reading.
rookie7
Poster
Poster
 
Posts: 12
Joined: Sun 27. Apr, 2003 16:19

Postby Niels on Mon 21. Jul, 2003 15:21

it would really not be a simple task to add a new "user_level, simply becose tthe user_level is hard coded into meny files, witch basically means you will have to search all the files for the word "user_level" and make needed modifications in order to add a new "level"

e.g. some places the code lok like this
Code: Select all
if ($userdata['user_level']==MOD)

you see this would in some situations should lok like
Code: Select all
if ($userdata['user_level']==MOD || $userdata['user_level']==SUP_MOD)


while in other it could stay as it is, all depending on what the code does.
Last edited by Niels on Mon 21. Jul, 2003 17:35, edited 1 time in total.
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby rookie7 on Mon 21. Jul, 2003 17:15

Thank you for the "enlightenment" Niels. As you can see...I have no php knowledge at all!

Thank again Niels and Kooky for reading. I guess you guys won't have time to do that much work then. I can still hope though, right?! :) Thanks again guys!
rookie7
Poster
Poster
 
Posts: 12
Joined: Sun 27. Apr, 2003 16:19

Postby rookie7 on Wed 23. Jul, 2003 10:50

Sorry to bother you again. I have a few questions. In the latest version, there's a folder called "contrib" and in that folder is "permissions." In the folder "permission" there's the text file called "admin_ug_auth_install.txt." What does that install?

Also...I was able to change the page_tail.php so that admins can see the mod panel also. Here's the code. By looking at this code, do you think it's a possible security issue in anyway?

Code: Select all
if ( $userdata['user_level'] == ADMIN )
{
   $admin_link = '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><a href="modcp/index.' . $phpEx. '?sid=' . $userdata['session_id'] . '">' . $lang['Mod_CP'] . '</a><br />';
}
else if ( $userdata['user_level'] == MOD )
{
   $admin_link = '<a href="modcp/index.' . $phpEx. '?sid=' . $userdata['session_id'] . '">' . $lang['Mod_CP'] . '</a><br /><br />';
}


Thanks for the help!
rookie7
Poster
Poster
 
Posts: 12
Joined: Sun 27. Apr, 2003 16:19

Postby kooky on Wed 23. Jul, 2003 23:06

permissions dir is a How to that explain how to add the file admin_ug_auth for the Mod CP to prevent a security bug against mess by moderators.

By default, with this file, the admin can change all forum permissions
With this new change, the moderators can't change groups forum permissions
but they can edit individual permissions (you must have totally rely in your moderators)

of course, don't edit your own file as admin, only the file into the modcp dir
kooky
brilliant supporter
 
Posts: 1329
Joined: Tue 31. Dec, 2002 17:52
Location: Au pays des rêves

Postby zoombini on Sun 02. Nov, 2003 21:46

Where can I find a supermoderator or jnr admin mod?
zoombini
Poster
Poster
 
Posts: 32
Joined: Sun 14. Sep, 2003 13:25

Next

Return to Moderator CP [2.0.17/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron