syntax = "proto2";

package alluxio.proto.shared;

// next available id: 3
enum AclAction {
    READ = 0;
    WRITE = 1;
    EXECUTE = 2;
}

// next available id: 6
enum AclEntryType {
    OWNER = 0;
    NAMED_USER = 1;
    OWNING_GROUP = 2;
    NAMED_GROUP = 3;
    MASK = 4;
    OTHER = 5;
}

// next available id: 2
message AclActions {
    repeated AclAction actions = 1;
}

// next available id: 5
message AclEntry {
    optional AclEntryType type = 1;
    optional string subject = 2;
    repeated AclAction actions = 3;
    optional bool isDefault = 4;
}

// AclActions for a String name.
// next available id: 3
message NamedAclActions {
    optional string name = 1;
    optional AclActions actions = 2;
}

// next available id: 9
message AccessControlList {
    optional string owningUser = 1;
    optional string owningGroup = 2;
    repeated NamedAclActions userActions = 3;
    repeated NamedAclActions groupActions = 4;
    optional AclActions maskActions = 5;
    optional AclActions otherActions = 6;
    optional bool isDefault = 7;
    optional bool isEmpty = 8;
}
