mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
🐛 Fixed email permissions for all roles
refs https://github.com/TryGhost/Team/issues/494 The migrations in 3.1.0 which added email permissions did not add those permissions to the roles. This means that whilst we have the permissions in the database, only the Owner role could use any of them. This migration ensures that the email related permissions are added to the correct roles.
This commit is contained in:
parent
1c7c246616
commit
68008baf0e
@ -0,0 +1,36 @@
|
||||
const {
|
||||
addPermissionWithRoles,
|
||||
combineTransactionalMigrations
|
||||
} = require('../../utils');
|
||||
|
||||
module.exports = combineTransactionalMigrations(
|
||||
addPermissionWithRoles({
|
||||
name: 'Read emails',
|
||||
action: 'read',
|
||||
object: 'email'
|
||||
}, [
|
||||
'Administrator',
|
||||
'Admin Integration',
|
||||
'Editor',
|
||||
'Author',
|
||||
'Contributor'
|
||||
]),
|
||||
addPermissionWithRoles({
|
||||
name: 'Browse emails',
|
||||
action: 'browse',
|
||||
object: 'email'
|
||||
}, [
|
||||
'Administrator',
|
||||
'Admin Integration',
|
||||
'Editor'
|
||||
]),
|
||||
addPermissionWithRoles({
|
||||
name: 'Retry emails',
|
||||
action: 'retry',
|
||||
object: 'email'
|
||||
}, [
|
||||
'Administrator',
|
||||
'Admin Integration',
|
||||
'Editor'
|
||||
])
|
||||
);
|
Loading…
Reference in New Issue
Block a user