Exemplo n.º 1
0
        public ObjectAclBuilder AddGroup(PredefinedGroup group, ObjectPermissions permissions)
        {
            if (permissions.HasAnyFlags(ObjectPermissions.Read))
            {
                ReadObject.AddGroup(group);
            }

            if (permissions.HasAnyFlags(ObjectPermissions.ReadAcl))
            {
                ReadAcl.AddGroup(group);
            }

            if (permissions.HasAnyFlags(ObjectPermissions.WriteAcl))
            {
                WriteAcl.AddGroup(group);
            }

            if (permissions.HasAnyFlags(ObjectPermissions.FullControl))
            {
                FullControl.AddGroup(group);
            }

            return(this);
        }
Exemplo n.º 2
0
        public ObjectAclBuilder AddGroup(string uri, ObjectPermissions permissions)
        {
            if (permissions.HasAnyFlags(ObjectPermissions.Read))
            {
                ReadObject.AddGroup(uri);
            }

            if (permissions.HasAnyFlags(ObjectPermissions.ReadAcl))
            {
                ReadAcl.AddGroup(uri);
            }

            if (permissions.HasAnyFlags(ObjectPermissions.WriteAcl))
            {
                WriteAcl.AddGroup(uri);
            }

            if (permissions.HasAnyFlags(ObjectPermissions.FullControl))
            {
                FullControl.AddGroup(uri);
            }

            return(this);
        }