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 = {
|
2019-11-05 18:01:42 +05:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* 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'],
|
|
|
|
|
2023-10-17 19:18:19 +02:00
|
|
|
'show-config': true,
|
2019-08-31 04:07:25 +05:00
|
|
|
'access-tokens/create': true,
|
2023-09-04 10:06:59 -05:00
|
|
|
'access-tokens/exchange': true,
|
2019-08-31 04:07:25 +05:00
|
|
|
};
|