/// <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; }
/// <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); }
/// <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); }