Exemplo n.º 1
0
        public virtual ActionResult RolesAndPermissions()
        {
            var model = new RoleAndPermissionViewModel
            {
                ResultSearchList = _rolesAndPermissionsService
                                   .GetRolesAndPermissionsList(new SearchRolesAndPermissionViewModel
                {
                    SearchRoleType   = 0,
                    SearchRoles      = string.Empty,
                    SearchPermission = string.Empty
                }).GetRolesAndPermissionsList
            };

            RolesAndPermissionsPermission();
            model.HasPermissionWrite = IDBContext.Current
                                       .HasPermission(Permission.ADMIN_ROLES_AND_PERMISSIONS_WRITE);
            model.RoleTypeItems    = _catalogService.GetListMasterData(MasterType.ROLE_TYPE);
            model.PermissionsItems = _viewModelMapperHelper.GetListPermission();
            model.RolesItems       = _viewModelMapperHelper.GetListRoleWithoutRoleID();

            return(View(model));
        }