code: private void verifyPermission(Subject subject, String permission)
              throws UnauthorizedException {
          if (!subject.hasPermission(permission)) {
              throw new UnauthorizedException();
          }
      }
docs: Verifies whether the user has a specific permission.  If not it throws a standard UnauthorizedException.
  @throws UnauthorizedException User did not have the permission