mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
🐛 invite permissions for Editor (#7724)
closes #7723 - editor role had no permissions assigned for invites
This commit is contained in:
parent
c946e3fc9c
commit
3d3101ad0e
2 changed files with 15 additions and 1 deletions
|
@ -365,7 +365,8 @@
|
|||
"user": "all",
|
||||
"role": "all",
|
||||
"client": "all",
|
||||
"subscriber": ["add"]
|
||||
"subscriber": ["add"],
|
||||
"invite": "all"
|
||||
},
|
||||
"Author": {
|
||||
"post": ["browse", "read", "add"],
|
||||
|
|
|
@ -325,6 +325,19 @@ describe('Invites API', function () {
|
|||
}).catch(checkForErrorType('NoPermissionError', done));
|
||||
});
|
||||
|
||||
it('CANNOT add an Adminstrator', function (done) {
|
||||
InvitesAPI.add({
|
||||
invites: [
|
||||
{
|
||||
email: 'test@example.com',
|
||||
role_id: testUtils.roles.ids.admin
|
||||
}
|
||||
]
|
||||
}, context.editor).then(function () {
|
||||
done(new Error('Editor should not be able to add an owner'));
|
||||
}).catch(checkForErrorType('NoPermissionError', done));
|
||||
});
|
||||
|
||||
it('CANNOT add an Author', function (done) {
|
||||
InvitesAPI.add({
|
||||
invites: [
|
||||
|
|
Loading…
Add table
Reference in a new issue