Skip to content

Commit

Permalink
Added support for TEMPLATE in user group permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
micahlmartin committed Sep 28, 2021
1 parent 8b3fd23 commit 656703f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions harness/api/graphql/enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ var AppPermissionTypes = struct {
Pipeline AppPermissionType
Provisioner AppPermissionType
Service AppPermissionType
Template AppPermissionType
Workflow AppPermissionType
}{
All: "ALL",
Expand All @@ -471,6 +472,7 @@ var AppPermissionTypes = struct {
Pipeline: "PIPELINE",
Provisioner: "PROVISIONER",
Service: "SERVICE",
Template: "TEMPLATE",
Workflow: "WORKFLOW",
}

Expand Down
6 changes: 6 additions & 0 deletions harness/api/graphql/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ type AppPermission struct {
Pipelines *PipelinePermissionFilter `json:"pipelines,omitempty"`
Provisioners *ProvisionerPermissionFilter `json:"provisioners,omitempty"`
Services *ServicePermissionFilter `json:"services,omitempty"`
Templates *TemplatePermissionFilter `json:"templates,omitempty"`
Workflows *WorkflowPermissionFilter `json:"workflows,omitempty"`
}

Expand Down Expand Up @@ -251,6 +252,11 @@ type EnvPermissionFilter struct {
FilterTypes []EnvFilterType `json:"filterTypes,omitempty"`
}

type TemplatePermissionFilter struct {
TemplateIds []string `json:"templateIds,omitempty"`
FilterType FilterType `json:"filterType,omitempty"`
}

type AccountPermissions struct {
AccountPermissionTypes []AccountPermissionType `json:"accountPermissionTypes,omitempty"`
}
Expand Down

0 comments on commit 656703f

Please sign in to comment.