-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bulk membership update implemented but not tested
- Loading branch information
Showing
9 changed files
with
302 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/scala/org/broadinstitute/dsde/workbench/sam/model/api/BulkMembershipUpdate.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.broadinstitute.dsde.workbench.sam.model.api | ||
|
||
import org.broadinstitute.dsde.workbench.model.WorkbenchEmail | ||
import org.broadinstitute.dsde.workbench.sam.model.{AccessPolicyName, PolicyIdentifiers, ResourceId, ResourceTypeName} | ||
import spray.json.RootJsonFormat | ||
|
||
case class PolicyMembershipUpdate( | ||
policyName: AccessPolicyName, | ||
addEmails: Set[WorkbenchEmail], | ||
addPolicies: Set[PolicyIdentifiers], | ||
removeEmails: Set[WorkbenchEmail], | ||
removePolicies: Set[PolicyIdentifiers] | ||
) | ||
object PolicyMembershipUpdate { | ||
import spray.json.DefaultJsonProtocol._ | ||
import SamJsonSupport._ | ||
import org.broadinstitute.dsde.workbench.model.WorkbenchIdentityJsonSupport._ | ||
implicit val policyMembershipUpdateFormat: RootJsonFormat[PolicyMembershipUpdate] = jsonFormat5(PolicyMembershipUpdate.apply) | ||
} | ||
|
||
case class BulkMembershipUpdate(resourceTypeName: ResourceTypeName, resourceId: ResourceId, policyUpdates: Seq[PolicyMembershipUpdate]) | ||
object BulkMembershipUpdate { | ||
import spray.json.DefaultJsonProtocol._ | ||
import SamJsonSupport._ | ||
import PolicyMembershipUpdate.policyMembershipUpdateFormat | ||
implicit val bulkMembershipUpdateFormat: RootJsonFormat[BulkMembershipUpdate] = jsonFormat3(BulkMembershipUpdate.apply) | ||
} |
Oops, something went wrong.