public void AddPermissions(SecurityInfo level) { if (level == null) return; Scopes.AddRange(level.ListScopeIds()); foreach (string permission in SecurityInfo.registeredPermissions) { if (permissions.ContainsKey(permission)) permissions[permission] |= level[permission]; else permissions.Add(permission, level[permission]); } }
public SecurityInfo CreateCopy(string domain, string name, bool isUser) { SecurityInfo copy = new SecurityInfo(_manager, domain, name, isUser); foreach (KeyValuePair<string, bool> permission in Permissions) { copy.Permissions.Add(permission.Key, permission.Value); } return copy; }