Hi Marius,
I don't really get your question. There is a property on the User object called Groups that will give you a GroupCollection of which groups that the user belongs to. You can iterate through this collection and check for a specific group. Is this what you are looking for?
//Tom
Hi Tom,
What I need is the methods to exclude any users not belonging to a group from viewing a forum.
Example: I have 2 forums. Forum A and Forum B. And three groups; Administrators, Members and Priviledged.
Forum A is open for Admins, Members. And Forum B is open for Admins and Priveledged. Users belonging to Members (All users are added to Members groups by default) will see Forum A, but not see Forum B. Any user belonging to Priveledged will se both forums.
Explained better? The admin system has all these groups and access rights, but this must be handled manually by code I assume, as no front end stuff is automatic? If you told me that it is it probably saves me many days of work :)
<marius>
I'm stuck and need some help here. I'm still trying to implement some access control on my application. This is mye code so far as for adding Rooms to a collection:
StarCommunity.Modules.Forum.Forum forum = ForumHandler.GetForum(forumID);
RoomCollection roomCollection = new RoomCollection();
foreach (Room room in forum.Rooms)
{
if(StarCommunity.Modules.Forum.Security.SecurityHandler.Instance.GetRoomAccessRights(room, CurrentUser).ReadRoom)
{ roomCollection.Add(room); }
}
When I look at the roomCollection it's count is 0 ![Undecided Undecided](/Util/tinyMCE/jscripts/tiny_mce/plugins/emotions/images/smiley-undecided.gif)
In admin you make groups and add users to various groups. I need to implement some access rights on my forum to separate forums between user groups and I can't find any documentation on this in the programmers handbook.
My app needs to check if a user is member of group and then add that to the list of things to show, likewise with rooms.
Anyone know how? It seems to be some mechanisms in episerver community for this, but I don't know where to start
/marius