示例#1
0
 internal static int AccessMaskFromRights(ObjectRights objectRights, AccessControlType controlType)
 {
     if ((objectRights < 0) || (objectRights > ObjectRights.FullControl))
     {
         throw new ArgumentOutOfRangeException("objectRights");
     }
     return (int)objectRights;
 }
示例#2
0
 internal static int AccessMaskFromRights(ObjectRights objectRights, AccessControlType controlType)
 {
     if ((objectRights < 0) || (objectRights > ObjectRights.FullControl))
     {
         throw new ArgumentOutOfRangeException("objectRights");
     }
     return((int)objectRights);
 }
示例#3
0
        public void IsPropertyReadOnly_ShouldReturn_True()
        {
            var dataObject    = new Case();
            var requiredFlags = new CasePropertyFlags();
            var readOnlyFlags = new CasePropertyFlags {
                Title = false
            };
            var objectRights = new ObjectRights();

            var dataObjectAccess = new En.DataObjectAccess(dataObject, requiredFlags, readOnlyFlags, objectRights);

            Assert.IsTrue(dataObjectAccess.IsPropertyReadOnly("Title"));
        }
示例#4
0
 public override void Deserialize(IPayloadReader reader)
 {
     base.Deserialize(reader);
     this.RequiredRights = (ObjectRights)reader.ReadInt32("RequiredRights");
 }
示例#5
0
 public UnauthorizedErrorPayload(Error errorType, ISharedObjectEntry objectEntry, ObjectRights requiredRights, string description, Guid clientId, ushort payloadId) :
     base(errorType, objectEntry, description, clientId, payloadId)
 {
     this.RequiredRights = requiredRights;
 }
示例#6
0
 internal UnauthorizedAccessEventArgs(UnauthorizedErrorPayload data)
     : base(data)
 {
     this.RequiredRights = data.RequiredRights;
 }
示例#7
0
 public SharedObjectAccessRule(string identity, ObjectRights objectRights, InheritanceFlags inheritanceFlags, AccessControlType type)
     : this(identity, AccessMaskFromRights(objectRights, type), false, inheritanceFlags, type)
 {
 }
示例#8
0
 internal SharedObjectAccessRule(string identity, ObjectRights objectRights, bool isInherited, InheritanceFlags inheritanceFlags, AccessControlType type)
     : base(identity, AccessMaskFromRights(objectRights, type), isInherited, inheritanceFlags, PropagationFlags.None, type)
 {
 }
 public DataObjectAccess(DataObject dataObject, DataObject requiredFlags, DataObject readOnlyFlags, ObjectRights objectRights)
     : base(dataObject, requiredFlags, readOnlyFlags)
 {
     _objectRights = objectRights;
 }
示例#10
0
 internal UnauthorizedAccessEventArgs(UnauthorizedErrorPayload data)
     : base(data)
 {
     this.RequiredRights = data.RequiredRights;
 }
示例#11
0
 public SharedObjectAccessRule(string identity, ObjectRights objectRights, InheritanceFlags inheritanceFlags, AccessControlType type)
     : this(identity, AccessMaskFromRights(objectRights, type), false, inheritanceFlags, type)
 {
 }
示例#12
0
 internal SharedObjectAccessRule(string identity, ObjectRights objectRights, bool isInherited, InheritanceFlags inheritanceFlags, AccessControlType type)
     : base(identity, AccessMaskFromRights(objectRights, type), isInherited, inheritanceFlags, PropagationFlags.None, type)
 {
 }