code: public boolean isCurrentUserAdmin() throws RepositoryException {
      	boolean isAdmin = false;
          final JackrabbitSession session = (JackrabbitSession) getSession();
          final UserManager userManager = session.getUserManager();
          Authorizable a = userManager.getAuthorizable(getRequest().getUserPrincipal());
          if (a instanceof org.apache.jackrabbit.api.security.user.User) {
          	isAdmin = ((org.apache.jackrabbit.api.security.user.User)a).isAdmin();
          }
          return isAdmin;
      }
docs: Returns true if the current request user is the admin user.