mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
feat: Move webhooks configuration from environment variable to UI
This commit is contained in:
parent
f0680831c2
commit
b22dba0d11
128 changed files with 2077 additions and 206 deletions
|
@ -93,6 +93,4 @@ module.exports.custom = {
|
|||
smtpPassword: process.env.SMTP_PASSWORD,
|
||||
smtpFrom: process.env.SMTP_FROM,
|
||||
smtpTlsRejectUnauthorized: process.env.SMTP_TLS_REJECT_UNAUTHORIZED !== 'false',
|
||||
|
||||
webhooks: JSON.parse(process.env.WEBHOOKS || '[]'), // TODO: validate structure
|
||||
};
|
||||
|
|
|
@ -18,6 +18,11 @@ module.exports.policies = {
|
|||
|
||||
'*': 'is-authenticated',
|
||||
|
||||
'webhooks/index': ['is-admin'],
|
||||
'webhooks/create': ['is-admin'],
|
||||
'webhooks/update': ['is-admin'],
|
||||
'webhooks/delete': ['is-admin'],
|
||||
|
||||
'users/create': ['is-authenticated', 'is-admin'],
|
||||
'users/delete': ['is-authenticated', 'is-admin'],
|
||||
|
||||
|
|
|
@ -64,6 +64,11 @@ function staticDirServer(prefix, dirFn) {
|
|||
module.exports.routes = {
|
||||
'GET /api/config': 'config/show',
|
||||
|
||||
'GET /api/webhooks': 'webhooks/index',
|
||||
'POST /api/webhooks': 'webhooks/create',
|
||||
'PATCH /api/webhooks/:id': 'webhooks/update',
|
||||
'DELETE /api/webhooks/:id': 'webhooks/delete',
|
||||
|
||||
'POST /api/access-tokens': 'access-tokens/create',
|
||||
'POST /api/access-tokens/exchange-with-oidc': 'access-tokens/exchange-with-oidc',
|
||||
'DELETE /api/access-tokens/me': 'access-tokens/delete',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue