mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
Added permissions for link edit endpoints (#15664)
refs https://github.com/TryGhost/Team/issues/2104 - adds edit permissions for links endpoints to fixtures - new `bulkEdit` endpoint will use the permissions and allow fixing newsletter links via Admin
This commit is contained in:
parent
14dfd618c3
commit
318a5a809c
@ -0,0 +1,10 @@
|
|||||||
|
const {addPermissionWithRoles} = require('../../utils');
|
||||||
|
|
||||||
|
module.exports = addPermissionWithRoles({
|
||||||
|
name: 'Edit links',
|
||||||
|
action: 'edit',
|
||||||
|
object: 'link'
|
||||||
|
}, [
|
||||||
|
'Administrator',
|
||||||
|
'Admin Integration'
|
||||||
|
]);
|
@ -623,6 +623,11 @@
|
|||||||
"name": "Browse links",
|
"name": "Browse links",
|
||||||
"action_type": "browse",
|
"action_type": "browse",
|
||||||
"object_type": "link"
|
"object_type": "link"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Edit links",
|
||||||
|
"action_type": "edit",
|
||||||
|
"object_type": "link"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -45,7 +45,7 @@ describe('Database Migration (special functions)', function () {
|
|||||||
const permissions = this.obj;
|
const permissions = this.obj;
|
||||||
|
|
||||||
// If you have to change this number, please add the relevant `havePermission` checks below
|
// If you have to change this number, please add the relevant `havePermission` checks below
|
||||||
permissions.length.should.eql(107);
|
permissions.length.should.eql(108);
|
||||||
|
|
||||||
permissions.should.havePermission('Export database', ['Administrator', 'DB Backup Integration']);
|
permissions.should.havePermission('Export database', ['Administrator', 'DB Backup Integration']);
|
||||||
permissions.should.havePermission('Import database', ['Administrator', 'DB Backup Integration']);
|
permissions.should.havePermission('Import database', ['Administrator', 'DB Backup Integration']);
|
||||||
|
@ -36,7 +36,7 @@ const validateRouteSettings = require('../../../../../core/server/services/route
|
|||||||
describe('DB version integrity', function () {
|
describe('DB version integrity', function () {
|
||||||
// Only these variables should need updating
|
// Only these variables should need updating
|
||||||
const currentSchemaHash = '76cfd2230c02c428e9505f6b9a3936ec';
|
const currentSchemaHash = '76cfd2230c02c428e9505f6b9a3936ec';
|
||||||
const currentFixturesHash = '6110a18edb75e3b7465d69385915984d';
|
const currentFixturesHash = 'dcb7ba7c66b4b98d6c26a722985e756a';
|
||||||
const currentSettingsHash = '2978a5684a2d5fcf089f61f5d368a0c0';
|
const currentSettingsHash = '2978a5684a2d5fcf089f61f5d368a0c0';
|
||||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||||
|
|
||||||
|
@ -623,6 +623,11 @@
|
|||||||
"name": "Browse links",
|
"name": "Browse links",
|
||||||
"action_type": "browse",
|
"action_type": "browse",
|
||||||
"object_type": "link"
|
"object_type": "link"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Edit links",
|
||||||
|
"action_type": "edit",
|
||||||
|
"object_type": "link"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user