feat: Add legal requirements (#1306)
This commit is contained in:
@@ -35,7 +35,7 @@ module.exports.custom = {
|
||||
baseUrlPath: parsedBasedUrl.pathname,
|
||||
baseUrlSecure: parsedBasedUrl.protocol === 'https:',
|
||||
|
||||
tokenExpiresIn: parseInt(process.env.TOKEN_EXPIRES_IN, 10) || 365,
|
||||
tokenExpiresIn: (parseInt(process.env.TOKEN_EXPIRES_IN, 10) || 365) * 24 * 60 * 60,
|
||||
|
||||
// Location to receive uploaded files in. Default (non-string value) is a Sails-specific location.
|
||||
uploadsTempPath: null,
|
||||
|
||||
@@ -36,6 +36,9 @@ module.exports.policies = {
|
||||
'projects/create': ['is-authenticated', 'is-external', 'is-admin-or-project-owner'],
|
||||
|
||||
'config/show': true,
|
||||
'terms/show': true,
|
||||
'access-tokens/create': true,
|
||||
'access-tokens/exchange-with-oidc': true,
|
||||
'access-tokens/accept-terms': true,
|
||||
'access-tokens/revoke-pending-token': true,
|
||||
};
|
||||
|
||||
@@ -64,6 +64,8 @@ function staticDirServer(prefix, dirFn) {
|
||||
module.exports.routes = {
|
||||
'GET /api/config': 'config/show',
|
||||
|
||||
'GET /api/terms/:type': 'terms/show',
|
||||
|
||||
'GET /api/webhooks': 'webhooks/index',
|
||||
'POST /api/webhooks': 'webhooks/create',
|
||||
'PATCH /api/webhooks/:id': 'webhooks/update',
|
||||
@@ -71,6 +73,8 @@ module.exports.routes = {
|
||||
|
||||
'POST /api/access-tokens': 'access-tokens/create',
|
||||
'POST /api/access-tokens/exchange-with-oidc': 'access-tokens/exchange-with-oidc',
|
||||
'POST /api/access-tokens/accept-terms': 'access-tokens/accept-terms',
|
||||
'POST /api/access-tokens/revoke-pending-token': 'access-tokens/revoke-pending-token',
|
||||
'DELETE /api/access-tokens/me': 'access-tokens/delete',
|
||||
|
||||
'GET /api/users': 'users/index',
|
||||
|
||||
Reference in New Issue
Block a user