/// <summary> /// Updates the access right set with the permissions for the specified object. /// </summary> private void UpdateAccessRightSet( SecuredObject objectToSecure, IdentityReference identity, bool denied, Dictionary <string, SecuredObjectAccessRights> setToUpdate) { SecuredObjectAccessRights accountRights = null; if (!setToUpdate.TryGetValue(identity.Value, out accountRights)) { accountRights = new SecuredObjectAccessRights(); accountRights.Identity = identity; setToUpdate.Add(identity.Value, accountRights); } if (denied) { accountRights.DeniedObjects |= objectToSecure; } else { accountRights.AllowedObjects |= objectToSecure; } }
/// <summary> /// Updates the access right set with the permissions for the specified object. /// </summary> private void UpdateAccessRightSet( SecuredObject objectToSecure, IdentityReference identity, bool denied, Dictionary<string, SecuredObjectAccessRights> setToUpdate) { SecuredObjectAccessRights accountRights = null; if (!setToUpdate.TryGetValue(identity.Value, out accountRights)) { accountRights = new SecuredObjectAccessRights(); accountRights.Identity = identity; setToUpdate.Add(identity.Value, accountRights); } if (denied) { accountRights.DeniedObjects |= objectToSecure; } else { accountRights.AllowedObjects |= objectToSecure; } }
public Item(SecuredObjectAccessRights accessRights, bool denied) { Identity = accessRights.Identity; Denied = denied; Rights = (denied) ? accessRights.DeniedObjects : accessRights.AllowedObjects; }
public Item(SecuredObjectAccessRights accessRights, bool denied) { Identity = accessRights.Identity; Denied = denied; Rights = (denied) ? accessRights.DeniedObjects : accessRights.AllowedObjects; }