Search in sources :

Example 1 with JcrAbstractActionsBuilder

use of com.thinkbiganalytics.metadata.modeshape.security.action.JcrAbstractActionsBuilder in project kylo by Teradata.

the class JcrSecurityRole method setPermissions.

/* (non-Javadoc)
     * @see com.thinkbiganalytics.security.role.SecurityRole#setPermissions(java.util.Collection)
     */
@Override
public void setPermissions(Collection<Action> actions) {
    Node actionsNode = getAllowedActionsNode();
    JcrActionTreeBuilder<JcrAbstractActionsBuilder> bldr = new JcrActionTreeBuilder<>(actionsNode, null);
    actions.forEach(action -> bldr.action(action));
    bldr.add();
}
Also used : Node(javax.jcr.Node) JcrActionTreeBuilder(com.thinkbiganalytics.metadata.modeshape.security.action.JcrActionTreeBuilder) JcrAbstractActionsBuilder(com.thinkbiganalytics.metadata.modeshape.security.action.JcrAbstractActionsBuilder)

Aggregations

JcrAbstractActionsBuilder (com.thinkbiganalytics.metadata.modeshape.security.action.JcrAbstractActionsBuilder)1 JcrActionTreeBuilder (com.thinkbiganalytics.metadata.modeshape.security.action.JcrActionTreeBuilder)1 Node (javax.jcr.Node)1