class AuthzHelper {

    public static boolean authorityAuthorizationAllowed(Principal principal) {

        Authority authority = principal.getAuthority();
        if (authority == null) {
            return true;
        }

        return authority.allowAuthorization();
    }

}