Skip to content

Commit

Permalink
Merge pull request #425 from cultuurnet/feature/5055-permissions-endp…
Browse files Browse the repository at this point in the history
…oints

Added places and events permissions endpoints
  • Loading branch information
Anahkiasen authored Feb 7, 2025
2 parents cbf6a93 + 1a5b28d commit 9335121
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 7 deletions.
17 changes: 17 additions & 0 deletions projects/uitdatabank/models/permission.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "string",
"description": "A permission that can be granted to a user",
"enum": [
"Aanbod bewerken",
"Aanbod modereren",
"Aanbod verwijderen",
"Aanbod historiek",
"Organisaties beheren",
"Organisaties bewerken",
"Gebruikers beheren",
"Labels beheren",
"Voorzieningen bewerken",
"Producties aanmaken",
"Films aanmaken"
]
}
179 changes: 172 additions & 7 deletions projects/uitdatabank/reference/entry.json
Original file line number Diff line number Diff line change
Expand Up @@ -2190,8 +2190,7 @@
{
"CLIENT_ACCESS_TOKEN": []
}
],
"parameters": []
]
},
"delete": {
"summary": "labels - delete",
Expand Down Expand Up @@ -2750,6 +2749,63 @@
]
}
},
"/events/{eventId}/permissions": {
"parameters": [
{
"$ref": "#/components/parameters/eventId"
}
],
"get": {
"summary": "permissions - get",
"tags": [
"Events"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permissions": {
"type": "array",
"description": "The permissions granted to the user for the event.",
"items": {
"$ref": "../models/permission.json"
}
}
},
"required": [
"permissions"
]
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"operationId": "get-events-eventId-permissions",
"x-internal": true,
"security": [
{
"USER_ACCESS_TOKEN": []
},
{
"CLIENT_ACCESS_TOKEN": []
}
],
"description": "Get user permissions relating to an event."
}
},
"/events/{eventId}/price-info": {
"parameters": [
{
Expand Down Expand Up @@ -3888,9 +3944,6 @@
},
"duplicatePlaceUri": {
"type": "string",
"x-stoplight": {
"id": "625qzdfcsviv2"
},
"description": "When a single duplicated place is found, this is the URI of the original place"
}
},
Expand Down Expand Up @@ -6016,6 +6069,63 @@
]
}
},
"/places/{placeId}/permissions": {
"parameters": [
{
"$ref": "#/components/parameters/placeId"
}
],
"get": {
"summary": "permissions - get",
"tags": [
"Places"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permissions": {
"type": "array",
"description": "The permissions granted to the user for the place.",
"items": {
"$ref": "../models/permission.json"
}
}
},
"required": [
"permissions"
]
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"operationId": "get-places-placeId-permissions",
"x-internal": true,
"security": [
{
"USER_ACCESS_TOKEN": []
},
{
"CLIENT_ACCESS_TOKEN": []
}
],
"description": "Get user permissions relating to a place."
}
},
"/places/{placeId}/price-info": {
"parameters": [
{
Expand Down Expand Up @@ -8149,6 +8259,63 @@
"deprecated": true
}
},
"/organizers/{organizerId}/permissions": {
"parameters": [
{
"$ref": "#/components/parameters/organizerId"
}
],
"get": {
"summary": "permissions - get",
"tags": [
"Events"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permissions": {
"type": "array",
"description": "The permissions granted to the user for the organizer.",
"items": {
"$ref": "../models/permission.json"
}
}
},
"required": [
"permissions"
]
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"operationId": "get-organizers-organizerId-permissions",
"x-internal": true,
"security": [
{
"USER_ACCESS_TOKEN": []
},
{
"CLIENT_ACCESS_TOKEN": []
}
],
"description": "Get user permissions relating to an organizer."
}
},
"/organizers/{organizerId}/url": {
"parameters": [
{
Expand Down Expand Up @@ -8301,7 +8468,6 @@
],
"x-internal": true
},
"parameters": [],
"get": {
"summary": "ownership - get",
"operationId": "get-ownerships",
Expand Down Expand Up @@ -9322,7 +9488,6 @@
},
"description": "Send the email to subscribe."
},
"parameters": [],
"description": "This endpoint allows users to subscribe an email address to a specified mailing list.",
"x-internal": true,
"security": [
Expand Down

0 comments on commit 9335121

Please sign in to comment.