1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 05:09:43 +02:00
planka/server/config/policies.js

30 lines
701 B
JavaScript
Raw Normal View History

2019-08-31 04:07:25 +05:00
/**
* Policy Mappings
* (sails.config.policies)
*
* Policies are simple functions which run **before** your actions.
*
* For more information on configuring policies, check out:
* https://sailsjs.com/docs/concepts/policies
*/
module.exports.policies = {
/**
*
* Default policy for all controllers and actions, unless overridden.
* (`true` allows public access)
*
*/
2019-08-31 04:07:25 +05:00
'*': 'is-authenticated',
'users/create': ['is-authenticated', 'is-admin'],
'users/delete': ['is-authenticated', 'is-admin'],
'projects/create': ['is-authenticated', 'is-admin-or-project-owner'],
'config/show': true,
2019-08-31 04:07:25 +05:00
'access-tokens/create': true,
'access-tokens/exchange-with-oidc': true,
2019-08-31 04:07:25 +05:00
};