Package org.sonatype.security.authorization

Examples of org.sonatype.security.authorization.Privilege.addProperty()


            priv.setName(resource.getName() != null ? resource.getName() + " - (" + method + ")" : null);
            priv.setDescription(resource.getDescription());
            priv.setType(TargetPrivilegeDescriptor.TYPE);

            priv.addProperty(ApplicationPrivilegeMethodPropertyDescriptor.ID, method);

            priv.addProperty(TargetPrivilegeRepositoryTargetPropertyDescriptor.ID, resource
                .getRepositoryTargetId());

            priv.addProperty(TargetPrivilegeRepositoryPropertyDescriptor.ID, resource.getRepositoryId());
View Full Code Here


            priv.setDescription(resource.getDescription());
            priv.setType(TargetPrivilegeDescriptor.TYPE);

            priv.addProperty(ApplicationPrivilegeMethodPropertyDescriptor.ID, method);

            priv.addProperty(TargetPrivilegeRepositoryTargetPropertyDescriptor.ID, resource
                .getRepositoryTargetId());

            priv.addProperty(TargetPrivilegeRepositoryPropertyDescriptor.ID, resource.getRepositoryId());

            priv.addProperty(TargetPrivilegeGroupPropertyDescriptor.ID, resource.getRepositoryGroupId());
View Full Code Here

            priv.addProperty(ApplicationPrivilegeMethodPropertyDescriptor.ID, method);

            priv.addProperty(TargetPrivilegeRepositoryTargetPropertyDescriptor.ID, resource
                .getRepositoryTargetId());

            priv.addProperty(TargetPrivilegeRepositoryPropertyDescriptor.ID, resource.getRepositoryId());

            priv.addProperty(TargetPrivilegeGroupPropertyDescriptor.ID, resource.getRepositoryGroupId());

            priv = getSecuritySystem().getAuthorizationManager(DEFAULT_SOURCE).addPrivilege(priv);
View Full Code Here

            priv.addProperty(TargetPrivilegeRepositoryTargetPropertyDescriptor.ID, resource
                .getRepositoryTargetId());

            priv.addProperty(TargetPrivilegeRepositoryPropertyDescriptor.ID, resource.getRepositoryId());

            priv.addProperty(TargetPrivilegeGroupPropertyDescriptor.ID, resource.getRepositoryGroupId());

            priv = getSecuritySystem().getAuthorizationManager(DEFAULT_SOURCE).addPrivilege(priv);

            result.addData(this.securityToRestModel(priv, request, true));
          }
View Full Code Here

    privilege.setReadOnly(secPriv.isReadOnly());
    privilege.setType(secPriv.getType());

    if (secPriv.getProperties() != null) {
      for (CProperty prop : (List<CProperty>) secPriv.getProperties()) {
        privilege.addProperty(prop.getKey(), prop.getValue());
      }
    }

    return privilege;
  }
View Full Code Here

      throws Exception
  {
    AuthorizationManager authzManager = this.getAuthorizationManager();

    Privilege privilege = new Privilege();
    privilege.addProperty("foo1", "bar2");
    privilege.addProperty("bar1", "foo2");
    privilege.setId("new-priv");
    privilege.setName("new-name");
    privilege.setDescription("new-description");
    privilege.setReadOnly(true);
View Full Code Here

  {
    AuthorizationManager authzManager = this.getAuthorizationManager();

    Privilege privilege = new Privilege();
    privilege.addProperty("foo1", "bar2");
    privilege.addProperty("bar1", "foo2");
    privilege.setId("new-priv");
    privilege.setName("new-name");
    privilege.setDescription("new-description");
    privilege.setReadOnly(true);
    privilege.setType("TEST");
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.