Examples of userIsAllowed()


Examples of org.apache.cocoon.portal.tools.service.UserRightsService.userIsAllowed()

        String url = parameters.getParameter("url");
        PortalToolManager ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
        try {
            UserRightsService userRightsService = ptm.getUserRightsService();
            // FIXME: replace the throw with something else
            if (!userRightsService.userIsAllowed(url, ptm.getPortalObjects().getPortalService().getComponentManager().getProfileManager().getUser())) {
                throw new ProcessingException(
                    "You are not allowed to request this page.");
            }
        } finally {
            this.manager.release(ptm);
View Full Code Here

Examples of org.apache.cocoon.portal.tools.service.UserRightsService.userIsAllowed()

        String url = parameters.getParameter("url");
        PortalToolManager ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
        try {
            UserRightsService userRightsService = ptm.getUserRightsService();
            // FIXME: replace the throw with something else
            if (!userRightsService.userIsAllowed(url, ptm.getPortalObjects().getPortalService().getComponentManager().getProfileManager().getUser())) {
                throw new ProcessingException(
                    "You are not allowed to request this page.");
            }
        } finally {
            this.manager.release(ptm);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.