Add missing buildService Role
@@ -17,11 +17,12 @@ public class Roles {
private final SystemName system;
- /** Create a Roles which can be used to create bound roles for the given system. */
+ /** Creates a Roles which can be used to create bound roles for the given system. */
public Roles(SystemName system) {
this.system = Objects.requireNonNull(system);
}
+
// General roles.
/** Returns a {@link ProtoRole#hostedOperator} for the current system. */
public UnboundRole hostedOperator() {
@@ -33,6 +34,7 @@ public class Roles {
return new UnboundRole(ProtoRole.everyone, system);
}
+
// Athenz based roles.
/** Returns a {@link ProtoRole#athenzTenantAdmin} for the current system and given tenant. */
public TenantRole athenzTenantAdmin(TenantName tenant) {
@@ -44,6 +46,7 @@ public class Roles {
return new ApplicationRole(ProtoRole.tenantPipeline, system, tenant, application);
}
+
// Other identity provider based roles.
/** Returns a {@link ProtoRole#tenantOwner} for the current system and given tenant. */
public TenantRole tenantOwner(TenantName tenant) {
@@ -85,4 +88,9 @@ public class Roles {
return new ApplicationRole(ProtoRole.applicationReader, system, tenant, application);
}
+ /** Returns a {@link ProtoRole#buildService} for the current system and given tenant and application. */
+ public ApplicationRole buildService(TenantName tenant, ApplicationName application) {
+ return new ApplicationRole(ProtoRole.buildService, system, tenant, application);
+ }
+
}
