public User(QNameManager.QName name, GranteeManager manager) : base(name, manager) { if (manager != null) { base.UpdateAllRights(); } }
public Grantee(QNameManager.QName name, GranteeManager man) { this.GranteeName = name; this.granteeManager = man; this.Roles = new OrderedHashSet <Grantee>(); Right right1 = new Right { IsFull = true, Grantor = GranteeManager.SystemAuthorisation, grantee = this }; this.OwnerRights = right1; }
public void DropUser(string name) { if (GranteeManager.IsReserved(name)) { throw Error.GetError(0xfa2, name); } if (!this._granteeManager.RemoveGrantee(name)) { throw Error.GetError(0xfa1, name); } if (this._userList.Remove(name) == null) { throw Error.GetError(0xfa1, name); } }
public HashSet <Grantee> VisibleGrantees() { HashSet <Grantee> set = new HashSet <Grantee>(); GranteeManager granteeManager = this.granteeManager; if (this.IsAdmin()) { Iterator <Grantee> iterator = granteeManager.GetGrantees().GetIterator(); while (iterator.HasNext()) { set.Add(iterator.Next()); } return(set); } set.Add(this); Iterator <Grantee> iterator2 = this.GetAllRoles().GetIterator(); while (iterator2.HasNext()) { set.Add(iterator2.Next()); } return(set); }
public UserManager(Database database) { this._granteeManager = database.GetGranteeManager(); this._userList = new HashMappedList <string, User>(); }