/// <summary> /// Copies all permissions to related users of the user type. /// </summary> /// <param name="userType">Type of the user.</param> /// <param name="node">The node.</param> public void CopyPermissions(IUserType userType, IContent node) { IEnumerable <char> permissions = GetPermissions(userType, node.Path); foreach (IUser user in userType.GetAllRelatedUsers()) { if (!user.IsAdmin() && !user.Disabled()) { ApplicationContext.Current.Services.UserService .ReplaceUserPermissions(user.Id, permissions, node.Id); } } }
/// <summary> /// Copies all permissions to related users of the user type. /// </summary> /// <param name="userType">Type of the user.</param> /// <param name="node">The node.</param> public void CopyPermissions(IUserType userType, IContent node) { IEnumerable<char>permissions = GetPermissions(userType, node.Path); foreach (IUser user in userType.GetAllRelatedUsers()) { if (!user.IsAdmin() && !user.Disabled()) { ApplicationContext.Current.Services.UserService .ReplaceUserPermissions(user.Id, permissions, node.Id); } } }