Examples of ACLImpl


Examples of org.springframework.security.acls.domain.AclImpl

    public int getCreateEntities() {
        return createEntities;
    }

    private void grantPermissions(int contactNumber, String recipientUsername, Permission permission) {
        AclImpl acl = (AclImpl) mutableAclService.readAclById(new ObjectIdentityImpl(Contact.class,
                    new Long(contactNumber)));
        acl.insertAce(acl.getEntries().size(), permission, new PrincipalSid(recipientUsername), true);
        updateAclInTransaction(acl);
    }
View Full Code Here

Examples of weblogic.security.acl.AclImpl

    // has the added twist that it expects rows for a given ACL to be
    // grouped together by principal.

    boolean more = true;
   
    AclImpl result = new AclImpl(aclOwner, null);
    AclEntryImpl entry = null;
    String currentPrincipal = null;

    try
    {
      do
      {
  String aclName = rs.getString(1);
  String principal = rs.getString(2);
  String permission = rs.getString(3);

  if (name == null)
  {
    name = aclName;
  }
  else if (aclName.equals(name) == false)
  {
    break;
  }
     
  if (currentPrincipal == null || currentPrincipal.equals(principal) == false)
  {
    // We're dealing with a new principal, so create a new AclEntry.
   
    currentPrincipal = principal;

    // There's an ordering constraint imposed here by the
    // AclImpl implementation: we must add all the Permissions
    // we will need to an AclEntry before adding the AclEntry to
    // the Acl.

    if (entry != null)
    {
      result.addEntry(aclOwner, entry);
    }

    Principal p = getPrincipal(principal);
   
    if (p == null)
    {
      throw new RDBMSException("acl \"" + name + "\" contains nonexistent " +
             "principal \"" + principal + "\"");
    }
   
    entry = new AclEntryImpl(p);
  }

  entry.addPermission(new PermissionImpl(permission));
      } while (more = rs.next());

      if (entry != null)
      {
  result.addEntry(aclOwner, entry);
      }
     
      result.setName(aclOwner, name);
    }
    catch (NotOwnerException e)
    {
      throw new RDBMSException("caught unexpected exception", e);
    }
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.