Package org.jahia.exceptions

Examples of org.jahia.exceptions.JahiaForbiddenAccessException


            if (JahiaUserManagerService.isGuest(user)) {
                throw new JahiaUnauthorizedException(
                        "You need to authenticate yourself to use this service");
            } else if (node != null ? !hasRequiredPermission(node, user, permissions)
                    : !hasRequiredPermission(user, permissions)) {
                throw new JahiaForbiddenAccessException(
                        "You have not enough permissions to use this service");
            }
        } catch (RepositoryException e) {
            logger.error("Cannot get permission", e);
            throw new JahiaForbiddenAccessException(
                    "You have not enough permissions to use this service");
        }
    }
View Full Code Here


                } else {
                    logger.debug("session login not valid.");
                    if (JahiaUserManagerService.isGuest((JahiaUser) session.getAttribute(ProcessingContext.SESSION_USER))) {
                        displayLogin(request, response, session);
                    } else {
                        throw new JahiaForbiddenAccessException();
                    }
                }
        } catch (Exception e) {
            if (e instanceof JahiaForbiddenAccessException) {
                throw (JahiaForbiddenAccessException) e;
            }
            logger.error("Error during " + operation + " operation of a new element we must flush all caches to ensure integrity between database and viewing", e);
            if (isValidLoginSession(session)) {
                displayMenu(request, response, session);
            } else {
                if (JahiaUserManagerService.isGuest((JahiaUser) session.getAttribute(ProcessingContext.SESSION_USER))) {
                    displayLogin(request, response, session);
                } else {
                    throw new JahiaForbiddenAccessException();
                }
            }
        }
    } // end userRequestDispatcher
View Full Code Here

            try {
                if (!hasAccess(urlResolver.getNode())) {
                    if (JahiaUserManagerService.isGuest(jcrSessionFactory.getCurrentUser())) {
                        throw new JahiaUnauthorizedException();
                    } else {
                        throw new JahiaForbiddenAccessException();
                    }
                }
            } catch (PathNotFoundException e) {

            }
View Full Code Here

TOP

Related Classes of org.jahia.exceptions.JahiaForbiddenAccessException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.