mirror of
https://github.com/plankanban/planka.git
synced 2025-08-05 21:45:30 +02:00
feat: Add INTERNAL_ACCESS_TOKEN
to support internal user configuration
This commit is contained in:
parent
b61b4e658f
commit
4346b7040a
8 changed files with 55 additions and 20 deletions
|
@ -50,6 +50,7 @@ module.exports.custom = {
|
|||
defaultAdminEmail:
|
||||
process.env.DEFAULT_ADMIN_EMAIL && process.env.DEFAULT_ADMIN_EMAIL.toLowerCase(),
|
||||
|
||||
internalAccessToken: process.env.INTERNAL_ACCESS_TOKEN,
|
||||
activeUsersLimit: envToNumber(process.env.ACTIVE_USERS_LIMIT),
|
||||
showDetailedAuthErrors: process.env.SHOW_DETAILED_AUTH_ERRORS === 'true',
|
||||
|
||||
|
|
|
@ -16,17 +16,24 @@ module.exports.policies = {
|
|||
*
|
||||
*/
|
||||
|
||||
'*': 'is-authenticated',
|
||||
'*': ['is-authenticated', 'is-external'],
|
||||
|
||||
'webhooks/index': ['is-admin'],
|
||||
'webhooks/create': ['is-admin'],
|
||||
'webhooks/update': ['is-admin'],
|
||||
'webhooks/delete': ['is-admin'],
|
||||
'webhooks/index': ['is-authenticated', 'is-external', 'is-admin'],
|
||||
'webhooks/create': ['is-authenticated', 'is-external', 'is-admin'],
|
||||
'webhooks/update': ['is-authenticated', 'is-external', 'is-admin'],
|
||||
'webhooks/delete': ['is-authenticated', 'is-external', 'is-admin'],
|
||||
|
||||
'users/index': 'is-authenticated',
|
||||
'users/create': ['is-authenticated', 'is-admin'],
|
||||
'users/show': 'is-authenticated',
|
||||
'users/update': 'is-authenticated',
|
||||
'users/update-email': 'is-authenticated',
|
||||
'users/update-password': 'is-authenticated',
|
||||
'users/update-username': 'is-authenticated',
|
||||
'users/update-avatar': 'is-authenticated',
|
||||
'users/delete': ['is-authenticated', 'is-admin'],
|
||||
|
||||
'projects/create': ['is-authenticated', 'is-admin-or-project-owner'],
|
||||
'projects/create': ['is-authenticated', 'is-external', 'is-admin-or-project-owner'],
|
||||
|
||||
'config/show': true,
|
||||
'access-tokens/create': true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue