public bool TryCheck(UserContext ctx, DataOperation op) { ACLVerdict result = Apply(ctx, op); switch (result) { case ACLVerdict.Denied: case ACLVerdict.None: return(false); } return(true); }
public bool TryCheck(ManagedSecurityContext sec, DataOperation op) { ACLVerdict result = Apply(sec, op); switch (result) { case ACLVerdict.Denied: case ACLVerdict.None: return(false); } return(true); }
public ACLVerdict Apply(UserContext ctx, DataOperation op) { ACLVerdict current = ACLVerdict.Denied; foreach (IACLEntry entry in _accessControlList) { ACLVerdict result = entry.Apply(ctx, op); switch (result) { case ACLVerdict.Denied: return(ACLVerdict.Denied); case ACLVerdict.Allowed: current = ACLVerdict.Allowed; break; } } return(current); }
public ACLVerdict Apply(ManagedSecurityContext sec, DataOperation op) { ACLVerdict current = ACLVerdict.Denied; foreach (IACLEntry entry in mAccessControlList) { ACLVerdict result = entry.Apply(sec, op); switch (result) { case ACLVerdict.Denied: return(ACLVerdict.Denied); case ACLVerdict.Allowed: current = ACLVerdict.Allowed; break; } } return(current); }