Skip to content

Commit

Permalink
Merge pull request #357 from ca-risken/feature/add-put-alert-first-vi…
Browse files Browse the repository at this point in the history
…ewd-at

add put-alert-first-viewed-at
  • Loading branch information
senk8 committed Mar 15, 2024
2 parents 7a0107f + ebc6189 commit 64c61d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/server/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ func (p *ProjectService) createDefaultRole(ctx context.Context, ownerUserID, pro
projectAdmin := "project-admin"
projectViewer := "project-viewer"
findingEditor := "finding-editor"
viewerActionPtn := "get|list|is-admin|put-alert-first-viewed-at"

for name, actionPtn := range map[string]string{projectAdmin: ".*", projectViewer: "/finding/.+", findingEditor: "get|list|is-admin|/finding/.+"} {
for name, actionPtn := range map[string]string{projectAdmin: ".*", projectViewer: viewerActionPtn, findingEditor: viewerActionPtn + "|/finding/.+|/alert/.+"} {
policy, err := p.iamClient.PutPolicy(ctx, &iam.PutPolicyRequest{
ProjectId: projectID,
Policy: &iam.PolicyForUpsert{
Expand Down

0 comments on commit 64c61d2

Please sign in to comment.