Examples of Authorizer


Examples of org.apache.lenya.ac.Authorizer

                String type = authorizerConfigurations[i].getAttribute(TYPE_ATTRIBUTE);
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("Adding authorizer [" + type + "]");
                }

                Authorizer authorizer = (Authorizer) authorizerSelector.select(type);
                authorizerKeys.add(type);
                authorizers.put(type, authorizer);
                configureOrParameterize(authorizer, authorizerConfigurations[i]);
            }
        }
View Full Code Here

Examples of org.brixcms.rmiserver.jackrabbit.Authorizer

        if (repository == null) {
            throw new IllegalStateException(
                    "Could not find UserService implementation in spring context");
        }

        authorizer = new Authorizer(users);
        credentialsProvider = getCredentialsProvider();
    }
View Full Code Here

Examples of org.cometd.bayeux.server.Authorizer

        {
            public void configureChannel(ConfigurableServerChannel channel)
            {
                // Grant create and subscribe to all and publishes only to service channels
                channel.addAuthorizer(GrantAuthorizer.GRANT_CREATE_SUBSCRIBE);
                channel.addAuthorizer(new Authorizer()
                {
                    public Result authorize(Operation operation, ChannelId channel, ServerSession session, ServerMessage message)
                    {
                        if (operation == Operation.PUBLISH && channel.isService())
                            return Result.grant();
View Full Code Here

Examples of org.cometd.bayeux.server.Authorizer

        String channelName = "/test";
        bayeux.createChannelIfAbsent(channelName, new ConfigurableServerChannel.Initializer()
        {
            public void configureChannel(ConfigurableServerChannel channel)
            {
                channel.addAuthorizer(new Authorizer()
                {
                    public Result authorize(Operation operation, ChannelId channel, ServerSession session, ServerMessage message)
                    {
                        return Result.ignore();
                    }
View Full Code Here

Examples of org.cometd.bayeux.server.Authorizer

        String channelName = "/test/denied";
        bayeux.createChannelIfAbsent(channelName, new ConfigurableServerChannel.Initializer()
        {
            public void configureChannel(ConfigurableServerChannel channel)
            {
                channel.addAuthorizer(new Authorizer()
                {
                    public Result authorize(Operation operation, ChannelId channel, ServerSession session, ServerMessage message)
                    {
                        return Result.deny("test");
                    }
View Full Code Here

Examples of org.cometd.bayeux.server.Authorizer

        String channelName = "/test/granted";
        bayeux.createChannelIfAbsent(channelName, new ConfigurableServerChannel.Initializer()
        {
            public void configureChannel(final ConfigurableServerChannel channel)
            {
                channel.addAuthorizer(new Authorizer()
                {
                    public Result authorize(Operation operation, ChannelId channelId, ServerSession session, ServerMessage message)
                    {
                        channel.removeAuthorizer(this);
                        return Result.grant();
View Full Code Here

Examples of org.ejbca.core.model.authorization.Authorizer

    private static final String[] customaccessrules = EjbcaConfiguration.getCustomAvailableAccessRules();
   
    private Authorizer getAuthorizer() {
        if (authCache.getAuthorizer() == null) {
          final GlobalConfiguration config = globalConfigurationSession.getCachedGlobalConfiguration(Admin.getInternalAdmin());
            authCache.setAuthorizer(new Authorizer(getAdminGroups(), config.getEnableCommandLineInterface(), logSession, LogConstants.MODULE_AUTHORIZATION));
        }
        return authCache.getAuthorizer();
    }
View Full Code Here

Examples of org.nxplanner.security.auth.Authorizer

        firstWritableIteration.setStartDate(new Date(DAY));
        Iteration secondNonWritableIteration = newIteration(project2);
       
        commitCloseAndOpenSession();

        Authorizer authorizer = new AuthorizerImpl();
        IterationRepository dao = new IterationRepository(session, authorizer, person.getId());
        List list = dao.fetchEditableIterations();

        ArrayAssert.assertEquals("iterations returned", new Iteration[] {firstWritableIteration, secondWritableIteration}, list.toArray());
    }
View Full Code Here

Examples of org.nxplanner.security.auth.Authorizer

        expectedStories[1] = newUserStory(firstWritableIteration);
        expectedStories[3] = newUserStory(secondWritableIteration);

        commitCloseAndOpenSession();

        Authorizer authorizer = new AuthorizerImpl();
        UserStoryRepository dao = new UserStoryRepository(session, authorizer, person.getId());
        List list = dao.fetchEditableStories();

        ArrayAssert.assertEquals("stories returned", expectedStories, list.toArray());
    }
View Full Code Here

Examples of org.nxplanner.security.auth.Authorizer

        ThreadSession.set(session);

        boolean result = false;

        // exact match
        Authorizer authorizer = SystemAuthorizer.get();
        result = authorizer.
                hasPermission(projectId, personId, "system.project", 1, "testpermission");
        assertTrue("wrong result", result);

        // no match
        result = authorizer.
                hasPermission(projectId, personId, "system.project", 10, "testpermission");
        assertFalse("wrong result", result);

        // resource type wildcard, resourceId wildcard, permission name wildcard
        // viewer role
        result = authorizer.
                hasPermission(projectId, personId, "system.project.iteration.story", 10, "read.test");
        assertTrue("wrong result", result);

        // resource type wildcard, resourceId exact match, permission name wildcard
        // editor role
        result = authorizer.
                hasPermission(projectId, personId, "system.project.iteration.story", 10, "read.test");
        assertTrue("wrong result", result);

        // resource type wildcard, resourceId non match, permission name wildcard
        result = authorizer.
                hasPermission(projectId, personId, "system.project.iteration.story", 11, "write.test");
        assertFalse("wrong result", result);
    }
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.