Author |
Topic  |
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 21 January 2005 : 22:21:34
|
My board has: 1 overall administrator (me) 1 admin 4 moderators.
Problem: I have a forum that I configured to "Allowed Memberlist (Hidden)", this works great except that the "admin" must not have access, unfortunately as an admin she does have access and I do not have a way to remove it except to demote her, this is not an option as she is the one who approves or denies new registrations.
Any suggestions? |
-=NiteOwl=-
|
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 22 January 2005 : 00:49:05
|
Try out the Admin Level MOD over at SnitzBitz. That should work pretty well for you. It might also be here as well. Check the MODs w/Code forum. |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 22 January 2005 : 04:15:05
|
I had a look at that MOD and even installed it, however it does not suit the purpose, it only allows or disallows a persons access to the admin screen.
My Admin still needs to verify new users and approve them. The main thing I want to accomplish is to be able to lock an ADMIN out of a forum that I have setup as private.
|
-=NiteOwl=-
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 22 January 2005 : 07:05:27
|
That's simply not the way the forum was conceived. An admin has no access restrictions. And what you're asking is to distinguish between several admins.
Not sure that this will work, but you could try to change two functions, chkForumAccess and chkForumAccessNew, in inc_func_secure.asp.
In the code for these functions, where you now have, at the beginning:
if MemberID = UserNum then
if mLev < 1 then
chkForumAccess = false
elseif mLev = 3 then
chkForumAccess = true
elseif mLev = 4 then
chkForumAccess = true
exit function
end if
end if
change it to
if MemberID = UserNum then
if mLev < 1 then
chkForumAccess = false
elseif mLev = 3 then
chkForumAccess = true
elseif mLev = 4 and MemberID<> YourOwnMemberID then
chkForumAccess = true
exit function
end if
end if
Add the red part and use your own memberID instead of YourOwnMemberID. As I said, I'm not sure that this will work, but I don't have the time to test it. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 22 January 2005 : 11:55:39
|
I changed the chkForumAccess no problem to elseif mLev = 4 and MemberID<> #### then however I was unable to find the chkForumAccessNew I tested anyway and found I could do everything I was doing before, appeared to be no change.
However you have me thinking, I think I see where you are going. Since I only want to restrict this one ADMIN from one specific forum and that forum is identified as a Allowed Memberlist (Hidden) would it be possible to enter a line somewhere (I have no idea) that basically says
elseif mLev = 3 and MemberID<> #### and Forum_ID<> ## then no access for you
BTW - This admin is at a mLev 3, thats why I used it in my example, I did set her to a mLev 4 to test the original code change but I could not see a difference.
|
-=NiteOwl=-
|
Edited by - NiteOwl on 22 January 2005 12:13:24 |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 23 January 2005 : 04:57:55
|
Do not change the member level in the DB, since mlev does not show that value.
You need to change chkForumAccessNew. It's in inc_func_secure.asp, immediately below chkForumAccess. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 23 January 2005 : 11:32:09
|
this is very strange, i did a search and can not find the word chkForumAccessNew in my inc_function_secure.asp file. I am running 3.4.03 |
-=NiteOwl=-
|
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 23 January 2005 : 17:50:35
|
I can, I guess I will. :( There goes my next week after work hours. :)
|
-=NiteOwl=-
|
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 23 January 2005 : 20:02:57
|
BTW ruirib, are you pretty certain that the above will enable me to restrict the admin from just 1 specif forum thats hidden and not all?
eg: elseif mLev = 3 and MemberID<> #### and Forum_ID<> ## then no access for you
The group I work for have a number of hidden forums but only one is to be restricted to this ADMIN person. sigh :) Sure is nice to have such a cool program like Snitz and so many many helpful people such as yourself.
|
-=NiteOwl=-
|
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 23 January 2005 : 23:51:49
|
ok, I have done an upgrade, I am 3.4.05, whew!!, now about this line:
elseif mLev = 4 and MemberID<> YourOwnMemberID then
Does this indicate that the level of this admin should be set to 4? she is currently at 3, I also just tried and this admin still has access.
So in a nutshell, I just want to stop this admin Level 3 from accessing one particular hidden forum. :) BTW, thanks, I very much appreciate the help.
|
-=NiteOwl=-
|
Edited by - NiteOwl on 24 January 2005 00:02:15 |
 |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 24 January 2005 : 01:20:14
|
If I recall correctly, mLev 3 signifies a Moderator, not an Admin. Unless you're using a MOD or have edited the database directly, mLev for all admins should be 4. I'm not entirely sure what mLev 2 is. I'm fairly certain that mLev 1 is just a regular member. Anyone out there know the exact breakdown of the levels? |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 24 January 2005 : 02:02:18
|
I checked and on my system: level in red
1 overall administrator (me) 3 1 admin 3 4 moderators. 2 regular members 1
|
-=NiteOwl=-
|
Edited by - NiteOwl on 24 January 2005 02:03:19 |
 |
|
Tam
New Member

Sweden
56 Posts |
Posted - 24 January 2005 : 03:23:49
|
mLev and Level is not same variable. |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 24 January 2005 : 04:22:34
|
NiteOwl, I wrote before that M_LEVEL in the database is not the same as mlev in the code. mlev will hold a value of 4 for an admin, and that's all you need. Do not change any code beyond what I suggested and do not change anything else in the database.
Am I sure that the change I suggested will be enough? No. I told you to try it. If it doesn't I will take another look, but I simply didn't and don't have the time now to test it.
Anyway, if this works, for her to have access to the other private forums, you will need to add her to the allowed members list. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
Edited by - ruirib on 24 January 2005 04:26:09 |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 24 January 2005 : 04:41:49
|
Ok, some more changes will be needed. In topic.asp, around line# 68, where you now have
if mLev = 4 then
and the test as before
if mLev = 4 and MemberID<> YourOwnMemberID then
A similar thing needs to be done in forum.asp, around line# 138
More changes may be needed, since access control is never explicitly verified for admins. However, I'm expecting that these changes in forum.asp and topic.asp will be enough to prevent topic reading. Check whether it does or not.
Make sure to make a backup of the unchanged files, unless you have not added mods to the Snitz base files, so that you are able to undone all these changes if they don't work as expected. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
Topic  |
|