Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mgmt): add Permission field in organization response #308

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/mgmt/v1beta/mgmt.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ enum OwnerType {
OWNER_TYPE_ORGANIZATION = 2;
}

// Permission defines how a resource can be used.
message Permission {
// Defines whether the resource can be modified.
bool can_edit = 1;
}

// MembershipState describes the state of a user membership to an organization.
enum MembershipState {
// Unspecified.
Expand Down Expand Up @@ -705,6 +711,8 @@ message Organization {
User owner = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
// Profile.
OrganizationProfile profile = 12;
// Permission
Permission permission = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// ListOrganizationsRequest represents a request to list all organizations
Expand Down
15 changes: 15 additions & 0 deletions openapiv2/core/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,10 @@ paths:
profile:
$ref: '#/definitions/v1betaOrganizationProfile'
description: Profile.
permission:
$ref: '#/definitions/v1betaPermission'
title: Permission
readOnly: true
title: The organization fields that will replace the existing ones.
required:
- id
Expand Down Expand Up @@ -2334,6 +2338,10 @@ definitions:
profile:
$ref: '#/definitions/v1betaOrganizationProfile'
description: Profile.
permission:
$ref: '#/definitions/v1betaPermission'
title: Permission
readOnly: true
description: |-
Organizations group several users. As entities, they can own resources such
as pipelines or releases.
Expand Down Expand Up @@ -2440,6 +2448,13 @@ definitions:
title: |-
PatchAuthenticatedUserResponse contains the updated user.
the authenticated user resource
v1betaPermission:
type: object
properties:
can_edit:
type: boolean
description: Defines whether the resource can be modified.
description: Permission defines how a resource can be used.
v1betaPipelineData:
type: object
properties:
Expand Down
11 changes: 11 additions & 0 deletions openapiv2/model/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3267,6 +3267,10 @@ definitions:
profile:
$ref: '#/definitions/v1betaOrganizationProfile'
description: Profile.
permission:
$ref: '#/definitions/v1betaPermission'
title: Permission
readOnly: true
description: |-
Organizations group several users. As entities, they can own resources such
as pipelines or releases.
Expand Down Expand Up @@ -3307,6 +3311,13 @@ definitions:
description: Organization.
readOnly: true
description: Owner is a wrapper for User and Organization, used to embed owner information in other resources.
v1betaPermission:
type: object
properties:
can_edit:
type: boolean
description: Defines whether the resource can be modified.
description: Permission defines how a resource can be used.
v1betaUser:
type: object
properties:
Expand Down
37 changes: 24 additions & 13 deletions openapiv2/vdp/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ paths:
type: string
description: README holds the pipeline documentation.
permission:
$ref: '#/definitions/v1betaPermission'
$ref: '#/definitions/vdppipelinev1betaPermission'
description: Permission defines how a pipeline can be used.
readOnly: true
visibility:
Expand Down Expand Up @@ -1379,7 +1379,7 @@ paths:
type: string
description: README holds the pipeline documentation.
permission:
$ref: '#/definitions/v1betaPermission'
$ref: '#/definitions/vdppipelinev1betaPermission'
description: Permission defines how a pipeline can be used.
readOnly: true
visibility:
Expand Down Expand Up @@ -3095,6 +3095,13 @@ definitions:
format: int32
description: Instill UI order.
description: Represents a field within the response.
coremgmtv1betaPermission:
type: object
properties:
can_edit:
type: boolean
description: Defines whether the resource can be modified.
description: Permission defines how a resource can be used.
googlelongrunningOperation:
type: object
properties:
Expand Down Expand Up @@ -4217,6 +4224,10 @@ definitions:
profile:
$ref: '#/definitions/v1betaOrganizationProfile'
description: Profile.
permission:
$ref: '#/definitions/coremgmtv1betaPermission'
title: Permission
readOnly: true
description: |-
Organizations group several users. As entities, they can own resources such
as pipelines or releases.
Expand Down Expand Up @@ -4257,16 +4268,6 @@ definitions:
description: Organization.
readOnly: true
description: Owner is a wrapper for User and Organization, used to embed owner information in other resources.
v1betaPermission:
type: object
properties:
can_edit:
type: boolean
description: Defines whether the resource can be modified.
can_trigger:
type: boolean
description: Defines whether the resource can be executed.
description: Permission defines how a resource can be used.
v1betaPipeline:
type: object
properties:
Expand Down Expand Up @@ -4329,7 +4330,7 @@ definitions:
type: string
description: README holds the pipeline documentation.
permission:
$ref: '#/definitions/v1betaPermission'
$ref: '#/definitions/vdppipelinev1betaPermission'
description: Permission defines how a pipeline can be used.
readOnly: true
visibility:
Expand Down Expand Up @@ -4835,6 +4836,16 @@ definitions:
$ref: '#/definitions/v1betaPipeline'
description: The validated pipeline resource.
description: ValidateUserPipelineResponse contains a validated pipeline.
vdppipelinev1betaPermission:
type: object
properties:
can_edit:
type: boolean
description: Defines whether the resource can be modified.
can_trigger:
type: boolean
description: Defines whether the resource can be executed.
description: Permission defines how a resource can be used.
securityDefinitions:
Bearer:
type: apiKey
Expand Down