public IActionResult ResourcePermissionTypeActions(int userId,
                                                           List <SelectableViewModel <ResourcePermissionTypeActionViewModel> > selectablePermissions)
        {
            var permissionsIds = GetSelectedItems(selectablePermissions).Select(x => x.Id);

            var result = m_usersManager.AssignResourcePermissionTypeActionsToUser(userId, permissionsIds);

            if (result.HasError)
            {
                ModelState.AddModelError(result.Error.Message);

                var viewModel = ViewModelBuilder.BuildUserResourcePermissionTypeActionsViewModel(ModelState, userId);

                return(View(viewModel));
            }

            return(RedirectToAction(nameof(View), new { id = userId }));
        }
        public IActionResult ResourcePermissionTypeActions(int userId)
        {
            var viewModel = ViewModelBuilder.BuildUserResourcePermissionTypeActionsViewModel(ModelState, userId);

            return(View(viewModel));
        }