/// <summary>
 /// Check if current user is allowed to perform a certain action.
 /// </summary>
 /// <param name="action">action to be checked.</param>
 /// <returns>true, if current user is allowed to perform action, false otherwise.</returns>
 public bool IsActionAllowed(CommunitiesAction action)
 {
     if (AllowedActions.ContainsKey(action))
     {
         return(AllowedActions[action]);
     }
     return(false);
 }
Example #2
0
 public GroupContent AddPermission(CommunitiesAction action, MembershipRole role)
 {
     Permissions[action] = role;
     return(this);
 }
Example #3
0
 /// <summary>
 /// Check if current user is allowed to perform a certain action.
 /// </summary>
 /// <param name="action">action to be checked.</param>
 /// <returns>true, if current user is allowed to perform action, false otherwise.</returns>
 public bool IsActionAllowed(CommunitiesAction action)
 {
     return(AvailableActions.ContainsKey(action) && AvailableActions[action]);
 }