Esempio n. 1
0
        public async Task <bool> ApproveAsync(int id, int clientId, int userId)
        {
            if (!await _permissionManager.HasPermission(clientId, userId, Permission.CanEditLeave))
            {
                throw new Exception("User has not permission to perform this operation");
            }

            return(await _leaveRepository.ApproveAsync(id, userId));
        }