Exemple #1
0
        private void VerifyCredentialsForUserBlock(string token)
        {
            User executingUser = UserUtillities.GetExecutingUserIfLoggedIn(token, _sessionRepository);

            if (!_permissionManager.HasPermission(executingUser, Action.BlockUser))
            {
                throw new ForbiddenAccessException();
            }
        }
Exemple #2
0
        public List <ActionDto> GetActionsOf(string token)
        {
            User executingUser = UserUtillities.GetExecutingUserIfLoggedIn(token, _sessionRepository);

            return(_objectMapper.Map <List <ActionDto> >(executingUser.PermittedActions));
        }