Class AdminPermissionChecker

  • public class AdminPermissionChecker
    extends Object
    Utility class to check if a session has administrative permissions (e.g. to check if a package can be installed)
    • Field Detail

      • VERSION_OAK_140

        public static final org.apache.maven.artifact.versioning.ComparableVersion VERSION_OAK_140
    • Method Detail

      • hasAdministrativePermissions

        public static boolean hasAdministrativePermissions​(@NotNull
                                                           @NotNull Session session,
                                                           String... additionalAdminAuthorizableIdsOrPrincipalNames)
                                                    throws RepositoryException
        Checks if the user who opened the session has administrative permissions
        session - a JCR session
        whether the passed session is an admin session
        RepositoryException - If an error occurrs.