Search in sources :

Example 6 with ObjectAce

use of org.pentaho.di.repository.pur.model.ObjectAce in project pentaho-kettle by pentaho.

the class UIRepositoryObjectAclModelTest method createUserAce.

private ObjectAce createUserAce(String recipientName) {
    ObjectRecipient objectRecipient = new RepositoryObjectRecipient(recipientName, ObjectRecipient.Type.USER);
    ObjectAce objectAce = new RepositoryObjectAce(objectRecipient, EnumSet.of(RepositoryFilePermission.READ, RepositoryFilePermission.WRITE));
    return objectAce;
}
Also used : ObjectRecipient(org.pentaho.di.repository.ObjectRecipient) RepositoryObjectRecipient(org.pentaho.di.repository.pur.model.RepositoryObjectRecipient) RepositoryObjectRecipient(org.pentaho.di.repository.pur.model.RepositoryObjectRecipient) ObjectAce(org.pentaho.di.repository.pur.model.ObjectAce) RepositoryObjectAce(org.pentaho.di.repository.pur.model.RepositoryObjectAce) RepositoryObjectAce(org.pentaho.di.repository.pur.model.RepositoryObjectAce)

Example 7 with ObjectAce

use of org.pentaho.di.repository.pur.model.ObjectAce in project pentaho-kettle by pentaho.

the class UIRepositoryObjectAclTest method createObjectAce.

private ObjectAce createObjectAce() {
    ObjectRecipient objectRecipient = new RepositoryObjectRecipient(RECIPIENT1, ObjectRecipient.Type.USER);
    ObjectAce objectAce = new RepositoryObjectAce(objectRecipient, EnumSet.of(RepositoryFilePermission.ALL));
    return objectAce;
}
Also used : ObjectRecipient(org.pentaho.di.repository.ObjectRecipient) RepositoryObjectRecipient(org.pentaho.di.repository.pur.model.RepositoryObjectRecipient) RepositoryObjectRecipient(org.pentaho.di.repository.pur.model.RepositoryObjectRecipient) ObjectAce(org.pentaho.di.repository.pur.model.ObjectAce) RepositoryObjectAce(org.pentaho.di.repository.pur.model.RepositoryObjectAce) RepositoryObjectAce(org.pentaho.di.repository.pur.model.RepositoryObjectAce)

Example 8 with ObjectAce

use of org.pentaho.di.repository.pur.model.ObjectAce in project pentaho-kettle by pentaho.

the class UIRepositoryObjectAclsTest method createObjectAce.

private ObjectAce createObjectAce(String recipientName) {
    ObjectRecipient objectRecipient = new RepositoryObjectRecipient(recipientName, ObjectRecipient.Type.USER);
    ObjectAce objectAce = new RepositoryObjectAce(objectRecipient, EnumSet.of(RepositoryFilePermission.READ, RepositoryFilePermission.WRITE));
    return objectAce;
}
Also used : ObjectRecipient(org.pentaho.di.repository.ObjectRecipient) RepositoryObjectRecipient(org.pentaho.di.repository.pur.model.RepositoryObjectRecipient) RepositoryObjectRecipient(org.pentaho.di.repository.pur.model.RepositoryObjectRecipient) ObjectAce(org.pentaho.di.repository.pur.model.ObjectAce) RepositoryObjectAce(org.pentaho.di.repository.pur.model.RepositoryObjectAce) RepositoryObjectAce(org.pentaho.di.repository.pur.model.RepositoryObjectAce)

Example 9 with ObjectAce

use of org.pentaho.di.repository.pur.model.ObjectAce in project pentaho-kettle by pentaho.

the class UIRepositoryObjectAcls method removeAcl.

public void removeAcl(String recipientName) {
    ObjectAce aceToRemove = null;
    for (ObjectAce ace : obj.getAces()) {
        if (ace.getRecipient().getName().equals(recipientName)) {
            aceToRemove = ace;
            break;
        }
    }
    obj.getAces().remove(aceToRemove);
}
Also used : ObjectAce(org.pentaho.di.repository.pur.model.ObjectAce)

Aggregations

ObjectAce (org.pentaho.di.repository.pur.model.ObjectAce)9 RepositoryObjectAce (org.pentaho.di.repository.pur.model.RepositoryObjectAce)7 RepositoryObjectRecipient (org.pentaho.di.repository.pur.model.RepositoryObjectRecipient)7 ObjectRecipient (org.pentaho.di.repository.ObjectRecipient)6 ArrayList (java.util.ArrayList)3 KettleException (org.pentaho.di.core.exception.KettleException)2 ObjectAcl (org.pentaho.di.repository.pur.model.ObjectAcl)2 RepositoryFileAcl (org.pentaho.platform.api.repository2.unified.RepositoryFileAcl)2 RepositoryFilePermission (org.pentaho.platform.api.repository2.unified.RepositoryFilePermission)2 RepositoryFileSid (org.pentaho.platform.api.repository2.unified.RepositoryFileSid)2 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 JobMeta (org.pentaho.di.job.JobMeta)1 RepositoryObjectAcl (org.pentaho.di.repository.pur.model.RepositoryObjectAcl)1 IAclService (org.pentaho.di.ui.repository.pur.services.IAclService)1 RepositoryFileAce (org.pentaho.platform.api.repository2.unified.RepositoryFileAce)1