Skip to content

Commit

Permalink
Added entity-collection resource type
Browse files Browse the repository at this point in the history
  • Loading branch information
breilly2 committed Oct 31, 2018
1 parent f734fac commit 8e28c1d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
32 changes: 32 additions & 0 deletions src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,36 @@ resourceTypes = {
reuseIds = true

}
entity-collection = {
actionPatternObjects = {
"delete" = {
description = "delete this entity collection"
},
"write" = {
description = "create/update/delete entities in this collection"
},
"read" = {
description = "read entities in this collection"
},
"alter_policies" = {
description = "alter entity collection policies"
},
"read_policies" = {
description = "read entity collection policies"
}
}
ownerRoleName = "owner"
roles = {
owner = {
roleActions = ["delete", "write", "read", "alter_policies", "read_policies"]
},
writer = {
roleActions = ["write", "read"]
},
reader = {
roleActions = ["read"]
}
}
reuseIds = false
}
}
4 changes: 2 additions & 2 deletions src/test/scala/Generator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ object Generator {
email <- genNonPetEmail
} yield BasicWorkbenchGroup(id, subject, email)

val genResourceTypeName: Gen[ResourceTypeName] = Gen.oneOf("workspace", "managed-group", "workflow-collection", "caas", "billing-project", "notebook-cluster", "cloud-extension", "dockstore-tool").map(ResourceTypeName.apply)
val genResourceTypeNameExcludeManagedGroup: Gen[ResourceTypeName] = Gen.oneOf("workspace", "workflow-collection", "caas", "billing-project", "notebook-cluster", "cloud-extension", "dockstore-tool").map(ResourceTypeName.apply)
val genResourceTypeName: Gen[ResourceTypeName] = Gen.oneOf("workspace", "managed-group", "workflow-collection", "caas", "billing-project", "notebook-cluster", "cloud-extension", "dockstore-tool", "entity-collection").map(ResourceTypeName.apply)
val genResourceTypeNameExcludeManagedGroup: Gen[ResourceTypeName] = Gen.oneOf("workspace", "workflow-collection", "caas", "billing-project", "notebook-cluster", "cloud-extension", "dockstore-tool", "entity-collection").map(ResourceTypeName.apply)
val genResourceId : Gen[ResourceId] = Gen.uuid.map(x => ResourceId(x.toString))
val genAccessPolicyName : Gen[AccessPolicyName] = Gen.oneOf("member", "admin", "admin-notifier").map(AccessPolicyName.apply) //there might be possible values
def genAuthDomains: Gen[Set[WorkbenchGroupName]] = Gen.listOfN[ResourceId](3, genResourceId).map(x => x.map(v => WorkbenchGroupName(v.value)).toSet) //make it a list of 3 items so that unit test won't time out
Expand Down

0 comments on commit 8e28c1d

Please sign in to comment.