Exemplo n.º 1
0
        internal static BucketAcl BucketUserAcl(
            string userGuid,
            string issuedByUserGuid,
            bool permitRead,
            bool permitWrite,
            bool permitReadAcp,
            bool permitWriteAcp,
            bool fullControl)
        {
            if (String.IsNullOrEmpty(userGuid))
            {
                throw new ArgumentNullException(nameof(userGuid));
            }
            if (String.IsNullOrEmpty(issuedByUserGuid))
            {
                throw new ArgumentNullException(nameof(issuedByUserGuid));
            }

            BucketAcl ret = new BucketAcl();

            ret.UserGroup        = null;
            ret.UserGUID         = userGuid;
            ret.IssuedByUserGUID = issuedByUserGuid;

            ret.PermitRead     = permitRead;
            ret.PermitWrite    = permitWrite;
            ret.PermitReadAcp  = permitReadAcp;
            ret.PermitWriteAcp = permitWriteAcp;
            ret.FullControl    = fullControl;

            return(ret);
        }
Exemplo n.º 2
0
 internal void AddBucketAcl(BucketAcl acl)
 {
     if (acl != null)
     {
         acl.BucketGUID = _Bucket.GUID;
         _ORM.Insert <BucketAcl>(acl);
     }
 }