Skip to content

Commit 4dac4f6

Browse files
authored
feat(policies): Add attestation as new resource type and workflow create permission (#754)
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent 163e829 commit 4dac4f6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/controlplane/internal/authz/authz.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const (
5757
ResourceWorkflow = "workflow"
5858
UserMembership = "membership_user"
5959
Organization = "organization"
60+
ResourceAttestation = "attestation"
6061

6162
// We have for now three roles, viewer, admin and owner
6263
// The owner of an org
@@ -102,10 +103,15 @@ var (
102103
PolicyWorkflowRunList = &Policy{ResourceWorkflowRun, ActionList}
103104
PolicyWorkflowRunRead = &Policy{ResourceWorkflowRun, ActionRead}
104105
// Workflow
105-
PolicyWorkflowList = &Policy{ResourceWorkflow, ActionList}
106-
PolicyWorkflowRead = &Policy{ResourceWorkflow, ActionRead}
106+
PolicyWorkflowCreate = &Policy{ResourceWorkflow, ActionCreate}
107+
PolicyWorkflowList = &Policy{ResourceWorkflow, ActionList}
108+
PolicyWorkflowRead = &Policy{ResourceWorkflow, ActionRead}
107109
// User Membership
108110
PolicyOrganizationRead = &Policy{Organization, ActionRead}
111+
// Attestation
112+
PolicyAttestationCreate = &Policy{ResourceAttestation, ActionCreate}
113+
PolicyAttestationRead = &Policy{ResourceAttestation, ActionRead}
114+
PolicyAttestationList = &Policy{ResourceAttestation, ActionList}
109115
)
110116

111117
// List of policies for each role

0 commit comments

Comments
 (0)