Skip to content

Commit

Permalink
simplyfy venture membership (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
xh3b4sd authored Mar 3, 2021
1 parent 78c3204 commit 2cb4b70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions pkg/ingress/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ var (
"po003": {subject.IsResourceOwner, action.Delete},
"po004": {subject.IsResourceOwner, action.Update},

// A resource member can search private resources.
"po005": {subject.IsResourceMember, action.Search, visibility.Private},
// A venture member can search private resources for that venture.
"po005": {subject.IsVentureMember, action.Search, visibility.Private},

// A venture member can create resources for that venture.
"po006": {subject.IsVentureMember, action.Create, resource.Timeline},
"po007": {subject.IsVentureMember, action.Create, resource.Message},
"po008": {subject.IsVentureMember, action.Create, resource.Update},
Expand Down
7 changes: 3 additions & 4 deletions pkg/label/subject/subject.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package subject
import "github.com/venturemark/permission/pkg/label"

const (
IsLoggedIn label.Label = "subject:is-logged-in"
IsResourceMember label.Label = "subject:is-resource-member"
IsResourceOwner label.Label = "subject:is-resource-owner"
IsVentureMember label.Label = "subject:is-venture-member"
IsLoggedIn label.Label = "subject:is-logged-in"
IsResourceOwner label.Label = "subject:is-resource-owner"
IsVentureMember label.Label = "subject:is-venture-member"
)

0 comments on commit 2cb4b70

Please sign in to comment.