Пример #1
0
 /// <summary>
 /// Checks if the target user is in the target group.
 /// </summary>
 /// <param name="group">The target group.</param>
 /// <param name="user">The target user.</param>
 /// <returns>Boolean indicating whether or not user is in target group.</returns>
 public static bool InGroup(WebDE.Types.AccessGroup group, User user)
 {
     if (API.GetGroups(user).Contains(group)) return true;
     return false;
 }
Пример #2
0
 /// <summary>
 /// Set the function that gets invoked when the specified resource gets updated.
 /// </summary>
 /// <param name="resource">The resource to be updated</param>
 /// <param name="function">The function to be invoked.</param>
 public static void SetResourceUpdate(WebDE.Types.Net.Resource resource, Action<Hashtable, UserContext> function)
 {
     updateResourceDispatch.Add(resource, function);
 }
Пример #3
0
 /// <summary>
 /// Check to see if the current user is in the target group.
 /// </summary>
 /// <param name="group">The target group to check for.</param>
 /// <returns>Boolean indicating if the user is in the target group.</returns>
 public bool InGroup(WebDE.Types.AccessGroup group)
 {
     return UserControl.InGroup(group, this);
 }