Make backup configure owner only
This commit is contained in:
@@ -238,6 +238,7 @@ function initializeExpressSync() {
|
||||
|
||||
// settings routes (these are for the settings tab - avatar & name have public routes for normal users. see above)
|
||||
router.get ('/api/v1/settings/:setting', token, authorizeAdmin, routes.settings.get);
|
||||
router.post('/api/v1/settings/backup_config', token, authorizeOwner, routes.settings.setBackupConfig);
|
||||
router.post('/api/v1/settings/:setting', token, authorizeAdmin, (req, res, next) => {
|
||||
return req.params.setting === 'cloudron_avatar' ? multipart(req, res, next) : next();
|
||||
}, routes.settings.set);
|
||||
|
||||
Reference in New Issue
Block a user