Exemplo n.º 1
0
        public IEnumerable <ASC.Common.Security.Authorizing.IRole> GetObjectRoles(ASC.Common.Security.Authorizing.ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext)
        {
            List <IRole> roles = new List <IRole>();

            if (account.ID.Equals(this.OwnerId))
            {
                roles.Add(ASC.Common.Security.Authorizing.Constants.Owner);
            }

            return(roles);
        }
 public IEnumerable <IRole> GetObjectRoles(ASC.Common.Security.Authorizing.ISubject account, ISecurityObjectId objectId, SecurityCallContext callContext)
 {
     return(account.ID == CreatorID ? new[] { Constants.Owner } : new IRole[0]);
 }