public List <string> GetGroupMembership(string id) { List <string> list = null; List <User> users = _dal.GetUserByName(id, exact: true); if (users?.Count > 0) { IEnumerable <GroupMembershipItem> membership = _dal.GetGroupMemberOf(users[0].UId, false); list = new List <string>(); foreach (GroupMembershipItem g in membership) { list.Add(g.Group.Name); } } return(list); }
public void RefreshStore() { if (IsServiceConnection) { Store = new SuplexStore { Users = _dal.GetUserByName(null, false), Groups = _dal.GetGroupByName(null, false), SecureObjects = _dal.GetSecureObjects() as List <SecureObject> }; } else { if (HasConnectionPath) { AsFileSystemDal.FromYamlFile(ConnectionPath); } Store = AsFileSystemDal.Store as SuplexStore; } Store.SecureObjects?.EnsureParentUIdRecursive(); }
public List <User> GetUserByName(string name = null, bool exact = false) { return(_dal.GetUserByName(name, exact)); }