feat(types): support new grant types
This commit is contained in:
1 parent
50990d1b19
commit
7dce1206ab
2 files changed
+7
-1
No files matched your search
@@ -932,7 +932,7 @@ func Test_AnonRestrictions(t *testing.T) {
|
||||
if i == resource.Controller || i == resource.Worker {
|
||||
continue
|
||||
}
|
||||
for j := action.Type(1); j <= action.Download; j++ {
|
||||
for j := action.Type(1); j <= action.DetachStoragePolicy; j++ {
|
||||
id := "foobar"
|
||||
prefixes := globals.ResourcePrefixesFromType(resource.Type(i))
|
||||
if len(prefixes) > 0 {
|
||||
|
||||
@@ -68,6 +68,8 @@ const (
|
||||
ListScopeKeyVersionDestructionJobs Type = 54
|
||||
DestroyScopeKeyVersion Type = 55
|
||||
Download Type = 56
|
||||
AttachStoragePolicy Type = 57
|
||||
DetachStoragePolicy Type = 58
|
||||
|
||||
// When adding new actions, be sure to update:
|
||||
//
|
||||
@@ -132,6 +134,8 @@ var Map = map[string]Type{
|
||||
ListScopeKeyVersionDestructionJobs.String(): ListScopeKeyVersionDestructionJobs,
|
||||
DestroyScopeKeyVersion.String(): DestroyScopeKeyVersion,
|
||||
Download.String(): Download,
|
||||
AttachStoragePolicy.String(): AttachStoragePolicy,
|
||||
DetachStoragePolicy.String(): DetachStoragePolicy,
|
||||
}
|
||||
|
||||
var DeprecatedMap = map[string]Type{
|
||||
@@ -202,6 +206,8 @@ func (a Type) String() string {
|
||||
"list-key-version-destruction-jobs",
|
||||
"destroy-key-version",
|
||||
"download",
|
||||
"attach-storage-policy",
|
||||
"detach-storage-policy",
|
||||
}[a]
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user