public SetPermissionsCommand(Guid przedsiebiorstwoId, SetPermissionsModel inputModel)
 {
     Model = inputModel;
     PrzedsiebiorstwoId = przedsiebiorstwoId;
 }
Exemple #2
0
        public void SetPermissionsForUser(long shoppingListId, string permissionsUserId, [FromBody] SetPermissionsModel setPermissionsModel)
        {
            var selectedPermissionIds = setPermissionsModel.selectedPermissionIds;

            if (selectedPermissionIds == null)
            {
                selectedPermissionIds = new List <long>();
            }
            selectedPermissionIds.Add((long)Permissions.View);
            _userService.SetPermissions(permissionsUserId, shoppingListId, selectedPermissionIds);
        }
        public async Task <IActionResult> NadajUprawnienia(SetPermissionsModel model)
        {
            await Mediator.Send(new SetPermissionsCommand(PrzedsiebiorstwoId, model));

            return(NoContent());
        }