mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
parent
7ef55ec578
commit
7d138b858d
10 changed files with 156 additions and 19 deletions
|
@ -26,6 +26,6 @@ module.exports.custom = {
|
|||
projectBackgroundImagesPath: path.join(sails.config.paths.public, 'project-background-images'),
|
||||
projectBackgroundImagesUrl: `${process.env.BASE_URL}/project-background-images`,
|
||||
|
||||
attachmentsPath: path.join(sails.config.paths.public, 'attachments'),
|
||||
attachmentsPath: path.join(sails.config.appPath, 'private', 'attachments'),
|
||||
attachmentsUrl: `${process.env.BASE_URL}/attachments`,
|
||||
};
|
||||
|
|
|
@ -18,21 +18,10 @@ module.exports.policies = {
|
|||
|
||||
'*': 'is-authenticated',
|
||||
|
||||
// 'users/index': ['is-authenticated', 'is-admin'],
|
||||
'users/create': ['is-authenticated', 'is-admin'],
|
||||
'users/delete': ['is-authenticated', 'is-admin'],
|
||||
|
||||
'projects/create': ['is-authenticated', 'is-admin'],
|
||||
// 'projects/update': ['is-authenticated', 'is-admin'],
|
||||
// 'projects/update-background-image': ['is-authenticated', 'is-admin'],
|
||||
// 'projects/delete': ['is-authenticated', 'is-admin'],
|
||||
|
||||
// 'project-memberships/create': ['is-authenticated', 'is-admin'],
|
||||
// 'project-memberships/delete': ['is-authenticated', 'is-admin'],
|
||||
|
||||
// 'boards/create': ['is-authenticated', 'is-admin'],
|
||||
// 'boards/update': ['is-authenticated', 'is-admin'],
|
||||
// 'boards/delete': ['is-authenticated', 'is-admin'],
|
||||
|
||||
'access-tokens/create': true,
|
||||
};
|
||||
|
|
|
@ -75,6 +75,16 @@ module.exports.routes = {
|
|||
'GET /api/notifications/:id': 'notifications/show',
|
||||
'PATCH /api/notifications/:ids': 'notifications/update',
|
||||
|
||||
'GET /attachments/:id/download/:filename': {
|
||||
action: 'attachments/download',
|
||||
skipAssets: false,
|
||||
},
|
||||
|
||||
'GET /attachments/:id/download/thumbnails/:filename': {
|
||||
action: 'attachments/download-thumbnail',
|
||||
skipAssets: false,
|
||||
},
|
||||
|
||||
'GET /*': {
|
||||
view: 'index',
|
||||
skipAssets: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue