Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Admin Level - Control?
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

NiteOwl
Junior Member

Canada
403 Posts

Posted - 21 January 2005 :  22:21:34  Show Profile  Visit NiteOwl's Homepage
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  Show Profile  Visit muzishun's Homepage
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)
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 22 January 2005 :  04:15:05  Show Profile  Visit NiteOwl's Homepage
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=-
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 22 January 2005 :  07:05:27  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 22 January 2005 :  11:55:39  Show Profile  Visit NiteOwl's Homepage
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
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 23 January 2005 :  04:57:55  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 23 January 2005 :  11:32:09  Show Profile  Visit NiteOwl's Homepage
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=-
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 23 January 2005 :  17:22:21  Show Profile  Send ruirib a Yahoo! Message
I no longer have the code for that version. Can't you upgrade?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 23 January 2005 :  17:50:35  Show Profile  Visit NiteOwl's Homepage
I can, I guess I will. :( There goes my next week after work hours. :)


-=NiteOwl=-
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 23 January 2005 :  20:02:57  Show Profile  Visit NiteOwl's Homepage
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=-
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 23 January 2005 :  23:51:49  Show Profile  Visit NiteOwl's Homepage
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
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 24 January 2005 :  01:20:14  Show Profile  Visit muzishun's Homepage
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)
Go to Top of Page

NiteOwl
Junior Member

Canada
403 Posts

Posted - 24 January 2005 :  02:02:18  Show Profile  Visit NiteOwl's Homepage
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
Go to Top of Page

Tam
New Member

Sweden
56 Posts

Posted - 24 January 2005 :  03:23:49  Show Profile  Visit Tam's Homepage
mLev and Level is not same variable.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 January 2005 :  04:22:34  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 January 2005 :  04:41:49  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07