Skip to content

Commit

Permalink
Merge pull request #5500 from hashicorp/f-acl-alloc-lifecycle
Browse files Browse the repository at this point in the history
acl: Add alloc-lifecycle namespace capability
  • Loading branch information
endocrimes authored Apr 11, 2019
2 parents 74190ff + e613da5 commit 1c06fd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion acl/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (
NamespaceCapabilityDispatchJob = "dispatch-job"
NamespaceCapabilityReadLogs = "read-logs"
NamespaceCapabilityReadFS = "read-fs"
NamespaceCapabilityAllocLifecycle = "alloc-lifecycle"
NamespaceCapabilitySentinelOverride = "sentinel-override"
)

Expand Down Expand Up @@ -93,7 +94,7 @@ func isNamespaceCapabilityValid(cap string) bool {
switch cap {
case NamespaceCapabilityDeny, NamespaceCapabilityListJobs, NamespaceCapabilityReadJob,
NamespaceCapabilitySubmitJob, NamespaceCapabilityDispatchJob, NamespaceCapabilityReadLogs,
NamespaceCapabilityReadFS:
NamespaceCapabilityReadFS, NamespaceCapabilityAllocLifecycle:
return true
// Separate the enterprise-only capabilities
case NamespaceCapabilitySentinelOverride:
Expand Down Expand Up @@ -122,6 +123,7 @@ func expandNamespacePolicy(policy string) []string {
NamespaceCapabilityDispatchJob,
NamespaceCapabilityReadLogs,
NamespaceCapabilityReadFS,
NamespaceCapabilityAllocLifecycle,
}
default:
return nil
Expand Down
1 change: 1 addition & 0 deletions acl/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func TestParse(t *testing.T) {
NamespaceCapabilityDispatchJob,
NamespaceCapabilityReadLogs,
NamespaceCapabilityReadFS,
NamespaceCapabilityAllocLifecycle,
},
},
{
Expand Down

0 comments on commit 1c06fd5

Please sign in to comment.