Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
AI OnAI Off
Help shape the future of CMS PaaS release notes! Take this quick survey and share your feedback.
GetAccessRights will only return the access rights set specifically for that user. If you have applied access rights to a usergroup as you say (I assume you mean an IGroup?), you'll have to call GetTotalAccessRights passing in your user for it to return your user's access rights merged with any inherited rights from groups.
Mattias
I'm sitting here making a call to GetAccessRights for an IUser and the RoomAccessRights object i have only has false values for a room, even if I set specific rights for a usergroup in admin. Is there another way to see if a user has a particular accessright to a room than this?
public static bool IsRoomMember(this RoomBase room, StarCommunity.Core.Modules.Security.IUser user)
{
if (room == null || user == null)
{
return false;
}
RoomAccessRights rights = room.GetAccessRights(user);
if (rights == null)
return false;
return rights.ReadRoom;
}