private boolean hasPermission(final UserRef userOrGroup,
                                  final AppPermission permission) {
        return userAppPermissionService.getDirectAppUserPermissions(userOrGroup)
                .stream()
                .anyMatch(perm -> perm.equals(permission));
    }
Creates an account in the internal identity provider
<p>
e.g manage_users ../local.yml
--createUser admin
--createGroup Administrators
--addToGroup admin Administrators
--grantPermission Administrators Administrator
stroom-app/src/main/java/stroom/app/commands/ManageUsersCommand.java