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: MOD Implementation
 Usergroups Mod and Permissions
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Webbo
Average Member

United Kingdom
982 Posts

Posted - 30 November 2008 :  16:01:30  Show Profile  Visit Webbo's Homepage
I've installed the UserGroup Mod, have private forums turned on, I've created and set a new forum to 'Allowed Member List (Hidden)'
and gone into the Usergroups manager and set the forum permissions to 'Allow'
and then checked in the new forum properties that the usergroup has the permissions set to 'Allow'

But when I login in as a user of one of those groups, it doesn't matter what setting I've set on the forum - allow, deny, read-only or do not set, I can't see the forum and if I reset the forum as 'Allowed Member List' (and not hidden) I can see the forum but am not allowed access.

I've tried logging out and logging back in but that didn't make any difference either

Everything seems to be ticking the right boxes but for some reason it just doesn't work and allowing a usergroup doesn't allow them to see or gain access to the forum

I've searched and this has show up in the results several times without a definate solution - Has anyone any ideas<

Webbo
Average Member

United Kingdom
982 Posts

Posted - 30 November 2008 :  16:49:19  Show Profile  Visit Webbo's Homepage
I've just checked the database and the table form_allowed_usergroups is being modified by the form within the Usergroups manager

Default/Allow = 0
Deny = 1
Read only = 2
Don't set = no entry in table

<

Edited by - Webbo on 30 November 2008 16:49:32
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 30 November 2008 :  17:51:08  Show Profile  Visit Webbo's Homepage
Going through the code changes in the Usergroup Mod, the following doesn't make sense to me:

quote:
In Forum.asp

approximately line 168 add:

'####### Begin UserGroup MOD #######
if strPrivateForums <> "1" and (Request.Form("Method_Type") <> "login") and (Request.Form("Method_Type") <> "logout") and ForumChkSkipAllowed = 0 then
result = ChkForumAccess(Forum_ID, MemberID, true)
end if
'####### End UserGroup MOD #######


quote:
this and surrounding code looks like:

if strPrivateForums = "1" and (Request.Form("Method_Type") <> "login") and (Request.Form("Method_Type") <> "logout") and ForumChkSkipAllowed = 0 then
result = ChkForumAccess(Forum_ID, MemberID, true)
end if

(1)'####### Begin UserGroup MOD #######
if strPrivateForums <> "1" and (Request.Form("Method_Type") <> "login") and (Request.Form("Method_Type") <> "logout") and ForumChkSkipAllowed = 0 then
result = ChkForumAccess(Forum_ID, MemberID, true)
end if
'####### End UserGroup MOD #######
(2)
if strModeration = "1" and AdminAllowed = 1 then
strUGView = Application(strCookieURL & "STRUGVIEW")
strUGMemView = Application(strCookieURL & "STRUGMEMVIEW")
strUGModForums = Application(strCookieURL & "STRUGMODFORUMS")
'####### End UserGroup MOD #######

if strSecureAdmin = "0" then
Session(strCookieURL & "Approval") = "15916941253"
end if


It looks like part of it is repeating the original code (1) and that part of it is missing (2) ??<

Edited by - Webbo on 30 November 2008 18:04:01
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 30 November 2008 :  23:00:36  Show Profile
I changed that routine on my installation.
if strPrivateForums = "1" and (Request.Form("Method_Type") <> "login") and (Request.Form("Method_Type") <> "logout") and ForumChkSkipAllowed = 0 then
	result = ChkForumAccess(Forum_ID, MemberID, true)
end if
'#######    Begin UserGroup MOD     #######
if strModeration = "1" and AdminAllowed = 1 then
	strUGView = Application(strCookieURL & "STRUGVIEW")
	strUGMemView = Application(strCookieURL & "STRUGMEMVIEW")
	strUGModForums = Application(strCookieURL & "STRUGMODFORUMS")
end if
'#######     End UserGroup MOD      #######


Did you run setup.asp after modifying config.asp, etc?<
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 01 December 2008 :  03:02:23  Show Profile  Visit Webbo's Homepage
I've tried that but the user is still not allowed access

It seems to me that the forum_allowed_usergroup table isn't being called on because I cannot find any reference to USERGROUP_ID or PERM in the forum.asp code, and without it I can't see how the software would know to allow access to specific groups<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 01 December 2008 :  10:31:40  Show Profile
That routine is in inc_header.asp - search for the following lines:
Response.Write	"<html>" & vbNewline & vbNewline & _
		"<head>" & vbNewline & _
		"<title>" & GetNewTitle(strScriptName) & "</title>" & vbNewline

Immediately before those, insert the following:
'#######    Begin UserGroup MOD     #######
if Session(strCookieURL & "UserGroups" & MemberID) = "" or _
	IsNull(Session(strCookieURL & "UserGroups" & MemberID)) then
	strGroupMembership = getGroupMembership(MemberID,1)
	Session(strCookieURL & "UserGroups" & MemberID) = strGroupMembership
	Session(strCookieURL & "UserGroups" & MemberID) = strGroupMembership
end if
'#######     End UserGroup MOD      #######


That calls on the 200+ lines of changed code from inc_func_common.asp to set permissions, etc.<

Edited by - Carefree on 01 December 2008 10:34:55
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 01 December 2008 :  16:37:11  Show Profile  Visit Webbo's Homepage
Carefree you are a Star

For some reason I missed that section of code out when implementing the mod
Now it's in place access seems to work - I just need to remember to tell the usergroup to log out and then log back in for the cookie to be set

Feedback for Carefree: Excellent A++++++, will use again <

Edited by - Webbo on 01 December 2008 16:38:20
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07