Exemplo n.º 1
0
 public UserRecordPermission(AccessType accessTypes, EntityMemberMask memberMask = null)
 {
     Peek = new OperationPermission(AccessType.Peek, accessTypes.IsSet(AccessType.Peek), memberMask);
       ReadStrict = new OperationPermission(AccessType.ReadStrict, accessTypes.IsSet(AccessType.ReadStrict), memberMask);
       UpdateStrict = new OperationPermission(AccessType.UpdateStrict, accessTypes.IsSet(AccessType.UpdateStrict), memberMask);
       AccessTypes = accessTypes;
 }
Exemplo n.º 2
0
 public UserRecordPermission()
 {
     AccessTypes = AccessType.None;
       Peek = new OperationPermission(AccessType.Peek, false);
       ReadStrict = new OperationPermission(AccessType.ReadStrict, false);
       UpdateStrict = new OperationPermission(AccessType.UpdateStrict, false);
 }
Exemplo n.º 3
0
 internal void Merge(OperationPermission other)
 {
     Util.Check(this.Operation == other.Operation, "Operation must match for merge.");
       switch(Status) {
     case PermissionStatus.AllowAll: return;
     case PermissionStatus.Denied:
       this.Status = other.Status;
       this.Mask = other.Mask;
       return;
     case PermissionStatus.AllowMasked:
       switch(other.Status) {
     case PermissionStatus.Denied: return;
     case PermissionStatus.AllowAll: this.Status = PermissionStatus.AllowAll; return;
     case PermissionStatus.AllowMasked: this.Mask.Or(other.Mask); return;
       }
       break;
       }
 }
Exemplo n.º 4
0
        internal void Merge(OperationPermission other)
        {
            Util.Check(this.Operation == other.Operation, "Operation must match for merge.");
            switch (Status)
            {
            case PermissionStatus.AllowAll: return;

            case PermissionStatus.Denied:
                this.Status = other.Status;
                this.Mask   = other.Mask;
                return;

            case PermissionStatus.AllowMasked:
                switch (other.Status)
                {
                case PermissionStatus.Denied: return;

                case PermissionStatus.AllowAll: this.Status = PermissionStatus.AllowAll; return;

                case PermissionStatus.AllowMasked: this.Mask.Or(other.Mask); return;
                }
                break;
            }
        } //method