From 763e5b916958220bbe8736b4ccb72b90e89beaee Mon Sep 17 00:00:00 2001 From: Lars Olzem Date: Tue, 17 Dec 2024 14:28:07 +0000 Subject: [PATCH] Add Group Permissions Enum --- .../requests/CreateGroupRoleRequest.yaml | 4 +-- .../requests/UpdateGroupRoleRequest.yaml | 4 +-- openapi/components/schemas/GroupMyMember.yaml | 5 +--- .../components/schemas/GroupPermissions.yaml | 27 +++++++++++++++++++ openapi/components/schemas/GroupRole.yaml | 4 +-- 5 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 openapi/components/schemas/GroupPermissions.yaml diff --git a/openapi/components/requests/CreateGroupRoleRequest.yaml b/openapi/components/requests/CreateGroupRoleRequest.yaml index 8877b22b..eb71ee07 100644 --- a/openapi/components/requests/CreateGroupRoleRequest.yaml +++ b/openapi/components/requests/CreateGroupRoleRequest.yaml @@ -11,8 +11,6 @@ properties: type: boolean default: false permissions: - type: array - items: - type: string + $ref: ../schemas/GroupPermissions.yaml diff --git a/openapi/components/requests/UpdateGroupRoleRequest.yaml b/openapi/components/requests/UpdateGroupRoleRequest.yaml index 0b3cc40f..3ee23118 100644 --- a/openapi/components/requests/UpdateGroupRoleRequest.yaml +++ b/openapi/components/requests/UpdateGroupRoleRequest.yaml @@ -9,8 +9,6 @@ properties: type: boolean default: false permissions: - type: array - items: - type: string + $ref: ../schemas/GroupPermissions.yaml order: type: integer diff --git a/openapi/components/schemas/GroupMyMember.yaml b/openapi/components/schemas/GroupMyMember.yaml index df26d5a7..bc6b0009 100644 --- a/openapi/components/schemas/GroupMyMember.yaml +++ b/openapi/components/schemas/GroupMyMember.yaml @@ -55,7 +55,4 @@ properties: items: type: string permissions: - type: array - items: - type: string - example: group-instance-join + $ref: ./GroupPermissions.yaml diff --git a/openapi/components/schemas/GroupPermissions.yaml b/openapi/components/schemas/GroupPermissions.yaml new file mode 100644 index 00000000..21242e91 --- /dev/null +++ b/openapi/components/schemas/GroupPermissions.yaml @@ -0,0 +1,27 @@ +type: array +items: + type: string + enum: + - group-announcement-manage + - group-audit-view + - group-bans-manage + - group-data-manage + - group-default-role-manage + - group-galleries-manage + - group-instance-age-gated-create + - group-instance-join + - group-instance-manage + - group-instance-moderate + - group-instance-open-create + - group-instance-plus-create + - group-instance-plus-portal + - group-instance-plus-portal-unlocked + - group-instance-public-create + - group-instance-queue-priority + - group-instance-restricted-create + - group-invites-manage + - group-members-manage + - group-members-remove + - group-members-viewall + - group-roles-assign + - group-roles-manage diff --git a/openapi/components/schemas/GroupRole.yaml b/openapi/components/schemas/GroupRole.yaml index d6d2359b..b798966a 100644 --- a/openapi/components/schemas/GroupRole.yaml +++ b/openapi/components/schemas/GroupRole.yaml @@ -13,9 +13,7 @@ properties: type: boolean default: false permissions: - type: array - items: - type: string + $ref: ./GroupPermissions.yaml isManagementRole: type: boolean default: false