Beispiel #1
0
 private static ServerManagerRights ResolveEditUsersDependencies(ServerManagerRights value)
 {
     if (value.HasFlag(ServerManagerRights.CreateUsers))
     {
         value |= ServerManagerRights.EditUsers;
     }
     return(value);
 }
Beispiel #2
0
 private static ServerManagerRights ResolveDepenciesOfAdministerDirectoryServices(ServerManagerRights value)
 {
     if (value.HasFlag(ServerManagerRights.AdministerDirectoryServices))
     {
         value |= ServerManagerRights.CreateUsers | ServerManagerRights.EditUsers |
                  ServerManagerRights.DeleteUsers | ServerManagerRights.AssignUsersToGroups |
                  ServerManagerRights.DeleteGroups | ServerManagerRights.CreateGroups;
     }
     return(value);
 }
Beispiel #3
0
        private static ServerManagerRights ResolveAssignUsersToGroupDependencies(ServerManagerRights rights)
        {
            const ServerManagerRights DEPENDENT_ON_ASSIGN_USER_TO_GROUP =
                ServerManagerRights.EditUsers | ServerManagerRights.CreateGroups | ServerManagerRights.CreateUsers;

            if (!rights.HasFlag(ServerManagerRights.AssignUsersToGroups) &&
                (rights & DEPENDENT_ON_ASSIGN_USER_TO_GROUP) != 0)
            {
                rights |= ServerManagerRights.AssignUsersToGroups;
            }
            return(rights);
        }