Package org.apache.cocoon.portal.tools.service

Examples of org.apache.cocoon.portal.tools.service.UserRightsService


                   Parameters parameters)
    throws Exception {
        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


    try {
        fSource = this.resolver.resolveURI(rootDir + confFile);
        DefaultConfigurationBuilder confBuilder = new DefaultConfigurationBuilder();
        this.configuration = confBuilder.build(fSource.getInputStream());
        fSource = this.resolver.resolveURI(rootDir + authFile);
        this.userRightsService = new UserRightsService();
        this.userRightsService.setLocation(fSource);
        this.userRightsService.initialize();
      this.init();
    } catch (ProcessingException e) {
      e.printStackTrace();
View Full Code Here

                   Parameters parameters)
    throws Exception {
        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

    try {
        fSource = this.resolver.resolveURI(rootDir + confFile);
        DefaultConfigurationBuilder confBuilder = new DefaultConfigurationBuilder();
        this.configuration = confBuilder.build(fSource.getInputStream());
        fSource = this.resolver.resolveURI(rootDir + authFile);
        this.userRightsService = new UserRightsService();
        this.userRightsService.setLocation(fSource);
        this.userRightsService.initialize();
      this.init();
    } catch (ProcessingException e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.cocoon.portal.tools.service.UserRightsService

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.