Skip to content

Commit

Permalink
🐛 invite permissions for Editor (#7724)
Browse files Browse the repository at this point in the history
closes #7723

- editor role had no permissions assigned for invites
  • Loading branch information
kirrg001 authored and ErisDS committed Nov 16, 2016
1 parent c946e3f commit 3d3101a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/server/data/schema/fixtures/fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@
"user": "all",
"role": "all",
"client": "all",
"subscriber": ["add"]
"subscriber": ["add"],
"invite": "all"
},
"Author": {
"post": ["browse", "read", "add"],
Expand Down
13 changes: 13 additions & 0 deletions core/test/integration/api/api_invites_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down

0 comments on commit 3d3101a

Please sign in to comment.