Examples of Permission


Examples of org.apache.archiva.redback.rbac.Permission

    @Override
    public Permission getPermission( String permissionName )
        throws RbacObjectNotFoundException, RbacManagerException
    {

        Permission el = permissionsCache.get( permissionName );
        if ( el != null )
        {
            return el;
        }

        Exception lastException = null;
        for ( RBACManager rbacManager : rbacManagersPerId.values() )
        {
            try
            {
                Permission p = rbacManager.getPermission( permissionName );
                if ( p != null )
                {
                    permissionsCache.put( permissionName, p );
                    return p;
                }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.Permission

  }

  public void checkGlobalPerms(Permission.Action... actions) throws IOException {
    Permission[] perms = new Permission[actions.length];
    for (int i = 0; i < actions.length; i++) {
      perms[i] = new Permission(actions[i]);
    }
    HTable acl = new HTable(conf, AccessControlLists.ACL_TABLE_NAME);
    try {
      AccessControllerProtocol protocol = acl.coprocessorProxy(AccessControllerProtocol.class,
        new byte[0]);
View Full Code Here

Examples of org.apache.harmony.jretools.policytool.model.Permission

                    newIndex = skipWhiteSpaces( newIndex ) + 1;
            }
            else
                newIndex = skipWhiteSpaces( classNameIndices[ 1 ] ) + 1;

            final Permission permission = new Permission();
            permission.setClassName( policyText.substring( classNameIndices[ 0 ], classNameIndices[ 1 ] ) );
            if ( targetNameIndices != null )
                permission.setTargetName( policyText.substring( targetNameIndices[ 0 ] + 1, targetNameIndices[ 1 ] - 1 ) );
            if ( actionsIndices != null )
                permission.setActions( policyText.substring( actionsIndices[ 0 ] + 1, actionsIndices[ 1 ] - 1 ) );
            if ( signedByIndices != null )
                permission.setSignedBy( policyText.substring( signedByIndices[ 0 ] + 1, signedByIndices[ 1 ] - 1 ) );
            grantEntry.getPermissionList().add( permission );
        }

        newIndex = skipWhiteSpaces( newIndex ) + 1; // index of '}' + 1 (comments skipped)
        if ( peekNextNonWhiteSpaceChar( newIndex ) != PolicyEntry.TERMINATOR_CHAR )
View Full Code Here

Examples of org.apache.jetspeed.om.security.Permission

            assertTrue(!service.hasRole(user.getUserName(), "user"));
            Role role3 = service.getRole(user.getUserName(),"user");
            assertTrue(null == role3);

            // add permission
            Permission perm1 = JetspeedSecurity.getPermission("info");
            assertTrue(null != perm1);
            service.addPermission("guest", perm1);
            Permission permission = service.getPermission("guest", "info");
            assertTrue(permission.getName().equals("info"));
            assertTrue(service.hasPermission("guest", "info"));

            // remove permission
            service.removePermission("guest", "info");
            assertTrue(!service.hasPermission( "guest", "info"));
            Permission perm2 = service.getPermission( "guest", "info");
            assertTrue(null == perm2);

        }
        catch (Exception e)
        {
View Full Code Here

Examples of org.apache.photark.security.authorization.Permission

            Session session = repositoryManager.getSession();
            Node allPermissions = (Node)session.getItem("/" + USER_STORE + "/" + ALL_PERMISSIONS);
            NodeIterator permissionNodes = allPermissions.getNodes();
            while (permissionNodes.hasNext()) {
                Node permissionNode = permissionNodes.nextNode();
                list.add(new Permission(permissionNode.getName(), permissionNode.getProperty(PERMISSION_DESCRIPTION)
                    .getString()));
            }
        } catch (ValueFormatException e) {
            e.printStackTrace();
        } catch (LoginException e) {
View Full Code Here

Examples of org.apache.qpid.server.security.access.Permission

                _logger.debug("Checking against rule: " + rule);
            }

            if (action.matches(rule.getAclAction(), addressOfClient))
            {
                Permission permission = rule.getPermission();

                switch (permission)
                {
                    case ALLOW_LOG:
                        CurrentActor.get().message(AccessControlMessages.ALLOWED(
View Full Code Here

Examples of org.apache.rave.portal.security.ModelPermissionEvaluator.Permission

     */
    @Override
    public boolean hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permissionString) {
        // find the appropriate ModelPermissionEvaluator from the map based on
        // the targetType and invoke the hasPermission function
        Permission permission = Permission.fromString((String) permissionString);
        if (permission == Permission.CREATE_OR_UPDATE) {
            throw new IllegalArgumentException("CREATE_OR_UPDATE not supported in this context.");
        }
        return getEvaluator(targetType).hasPermission(authentication, targetId, targetType, permission);
    }   
View Full Code Here

Examples of org.apache.shiro.authz.Permission

    assertFalse(REQUEST_SERVER1_URI2.implies(ROLE_SERVER_SERVER1_URI_URI2));
    assertFalse(REQUEST_SERVER1_URI1.implies(ROLE_SERVER_SERVER1_URI_URI2));
  };
  @Test
  public void testUnexpected() throws Exception {
    Permission p = new Permission() {
      @Override
      public boolean implies(Permission p) {
        return false;
      }
    };
View Full Code Here

Examples of org.apache.turbine.om.security.Permission

                Attributes attribs = sr.getAttributes();
                Attribute attr = attribs.get("turbinePermissionName");

                if (attr != null && attr.get() != null)
                {
                    Permission perm = getNewPermission(attr.get().toString());

                    permissions.add(perm);
                }
                else
                {
View Full Code Here

Examples of org.apache.turbine.om.security.Permission

    public void testPermissionById()
            throws Exception
    {
        SecurityService ss = TurbineSecurity.getService();

        Permission permission = ss.getPermissionById(2);
        assertNotNull(permission);
        assertEquals(permission.getName(), "Application");
    }
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.