示例#1
0
        public static dtoEditAssignment Create(ItemAssignments assignment, String translation = "")
        {
            dtoEditAssignment item = new dtoEditAssignment();

            item.Id          = assignment.Id;
            item.Permissions = assignment.Permissions;
            item.Denyed      = assignment.Denyed;
            item.Inherited   = assignment.Inherited;
            item.IdCommunity = assignment.IdCommunity;
            item.IdRole      = assignment.IdRole;
            item.IdPerson    = assignment.IdPerson;
            item.Type        = assignment.Type;
            item.SetPermissionsTranslation(translation);
            item.ReadOnly  = assignment.Inherited;
            item.CreatedOn = assignment.CreatedOn;
            return(item);
        }
示例#2
0
 public virtual Boolean isSettingsEqual(ItemAssignments other, Boolean ignoreDeny = false)
 {
     return(IdCommunity == other.IdCommunity && other.IdPerson == IdPerson && other.IdRole == IdRole && other.Type == Type && (ignoreDeny || other.Denyed == Denyed));
 }