Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/12/16 15:28:19 (9 years ago)
Author:
jlodewyc
Message:

#2582 User management done, start resource calendar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/User/UserViewModel.cs

    r13742 r13754  
    1818        public Access.User SelectedUser { get; set; }
    1919        public List<Access.UserGroup> SelectedUserSubscriptions { get; set; }
     20        public List<Access.Role> SelectedUserRoles { get; set; }
    2021        public Access.UserGroup SelectedGroup { get; set; }
    2122        public List<Access.UserGroupBase> SelectedGroupMembers { get; set; }
     23        public Access.Role SelectedRole { get; set; }
     24        public List<Access.UserGroupBase> SelectedRoleEnrolled { get; set; }
    2225
    2326        public UserViewModel(AccessAdministrationClient ac)
     
    2528            users = new List<Access.User>();
    2629            accessClient = ac;
     30
    2731            SelectedUser = new Access.User();
    2832            SelectedGroup = new Access.UserGroup();
     33            SelectedRole = new Access.Role();
     34            SelectedRole.Name = "";
     35
    2936            SelectedUserSubscriptions = new List<Access.UserGroup>();
     37            SelectedUserRoles = new List<Access.Role>();
    3038            SelectedGroupMembers = new List<Access.UserGroupBase>();
    3139           
    3240           
     41        }
     42        public UserViewModel refreshAll()
     43        {
     44            refreshUsers();
     45            refreshGroups();
     46            refreshRoles();
     47            return this;
    3348        }
    3449        public UserViewModel refreshUsers()
     
    5873            return ugroups.Find(x => x.Id == id);
    5974        }
     75        public Access.Role getRoleByName(string name)
     76        {
     77            return roles.Find(x => x.Name == name);
     78        }
    6079    }
    6180}
Note: See TracChangeset for help on using the changeset viewer.