Beispiel #1
0
 internal static int AccessMaskFromRights(ObjectRights objectRights, AccessControlType controlType)
 {
     if ((objectRights < 0) || (objectRights > ObjectRights.FullControl))
     {
         throw new ArgumentOutOfRangeException("objectRights");
     }
     return (int)objectRights;
 }
 internal static int AccessMaskFromRights(ObjectRights objectRights, AccessControlType controlType)
 {
     if ((objectRights < 0) || (objectRights > ObjectRights.FullControl))
     {
         throw new ArgumentOutOfRangeException("objectRights");
     }
     return((int)objectRights);
 }
Beispiel #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"));
        }
Beispiel #4
0
 public override void Deserialize(IPayloadReader reader)
 {
     base.Deserialize(reader);
     this.RequiredRights = (ObjectRights)reader.ReadInt32("RequiredRights");
 }
Beispiel #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;
 }
Beispiel #6
0
 internal UnauthorizedAccessEventArgs(UnauthorizedErrorPayload data)
     : base(data)
 {
     this.RequiredRights = data.RequiredRights;
 }
 public SharedObjectAccessRule(string identity, ObjectRights objectRights, InheritanceFlags inheritanceFlags, AccessControlType type)
     : this(identity, AccessMaskFromRights(objectRights, type), false, inheritanceFlags, type)
 {
 }
 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;
 }
Beispiel #10
0
 internal UnauthorizedAccessEventArgs(UnauthorizedErrorPayload data)
     : base(data)
 {
     this.RequiredRights = data.RequiredRights;
 }
Beispiel #11
0
 public SharedObjectAccessRule(string identity, ObjectRights objectRights, InheritanceFlags inheritanceFlags, AccessControlType type)
     : this(identity, AccessMaskFromRights(objectRights, type), false, inheritanceFlags, type)
 {
 }
Beispiel #12
0
 internal SharedObjectAccessRule(string identity, ObjectRights objectRights, bool isInherited, InheritanceFlags inheritanceFlags, AccessControlType type)
     : base(identity, AccessMaskFromRights(objectRights, type), isInherited, inheritanceFlags, PropagationFlags.None, type)
 {
 }