Exemplo n.º 1
0
 public dtoEditAssignment()
 {
     TranslatedPermissions = new dtoDisplayPermissions()
     {
         Type = PermissionType.none, Value = ""
     };
 }
Exemplo n.º 2
0
        public static dtoDisplayPermissions Create(long permissions, Boolean inherited, Boolean denyed, Boolean hasMoreItems, String translation)
        {
            dtoDisplayPermissions item = new dtoDisplayPermissions();

            item.Type = (inherited ? PermissionType.inherited : PermissionType.none) | (denyed ? PermissionType.denyed : PermissionType.allowed)
                        | (permissions == 0 ? PermissionType.nopermissions : PermissionType.none) | (hasMoreItems ? PermissionType.needmoreinfo : PermissionType.none);
            item.Value = translation;
            return(item);
        }
Exemplo n.º 3
0
 public void SetPermissionsTranslation(String translation)
 {
     if (TranslatedPermissions == null)
     {
         TranslatedPermissions = new dtoDisplayPermissions();
     }
     TranslatedPermissions.Type = (Inherited ? PermissionType.inherited: PermissionType.none) | (Denyed ? PermissionType.denyed: PermissionType.allowed)
                                  | (Permissions == 0 ? PermissionType.nopermissions : PermissionType.none);
     TranslatedPermissions.Value = translation;
 }