Search in sources :

Example 1 with AclAction

use of alluxio.security.authorization.AclAction in project alluxio by Alluxio.

the class ProtoUtils method toProto.

/**
 * @param aclEntry the acl entry
 * @return the proto representation of instance
 */
public static Acl.AclEntry toProto(AclEntry aclEntry) {
    Acl.AclEntry.Builder builder = Acl.AclEntry.newBuilder();
    builder.setType(toProto(aclEntry.getType()));
    builder.setSubject(aclEntry.getSubject());
    builder.setIsDefault(aclEntry.isDefault());
    for (AclAction action : aclEntry.getActions().getActions()) {
        builder.addActions(toProto(action));
    }
    return builder.build();
}
Also used : AclEntry(alluxio.security.authorization.AclEntry) SetAclAction(alluxio.grpc.SetAclAction) AclAction(alluxio.security.authorization.AclAction)

Example 2 with AclAction

use of alluxio.security.authorization.AclAction in project alluxio by Alluxio.

the class GrpcUtils method toProto.

/**
 * @param aclEntry the acl entry to convert
 * @return the proto representation of AclEntry instance
 */
public static PAclEntry toProto(AclEntry aclEntry) {
    PAclEntry.Builder pAclEntry = PAclEntry.newBuilder();
    pAclEntry.setType(toProto(aclEntry.getType()));
    pAclEntry.setSubject(aclEntry.getSubject());
    pAclEntry.setIsDefault(aclEntry.isDefault());
    for (AclAction action : aclEntry.getActions().getActions()) {
        pAclEntry.addActions(toProto(action));
    }
    return pAclEntry.build();
}
Also used : AclAction(alluxio.security.authorization.AclAction)

Example 3 with AclAction

use of alluxio.security.authorization.AclAction in project alluxio by Alluxio.

the class ProtoUtils method toProto.

/**
 * @param actions the {@link AclActions}
 * @return the protobuf representation of {@link AclActions}
 */
public static Acl.AclActions toProto(AclActions actions) {
    Acl.AclActions.Builder builder = Acl.AclActions.newBuilder();
    for (AclAction action : actions.getActions()) {
        Acl.AclAction pAction = toProto(action);
        builder.addActions(pAction);
    }
    return builder.build();
}
Also used : AclActions(alluxio.security.authorization.AclActions) SetAclAction(alluxio.grpc.SetAclAction) AclAction(alluxio.security.authorization.AclAction) Acl(alluxio.proto.shared.Acl)

Aggregations

AclAction (alluxio.security.authorization.AclAction)3 SetAclAction (alluxio.grpc.SetAclAction)2 Acl (alluxio.proto.shared.Acl)1 AclActions (alluxio.security.authorization.AclActions)1 AclEntry (alluxio.security.authorization.AclEntry)1