Ghost/core/server/data/fixtures/permissions/permissions.json
Hannah Wolfe 0565027900 Refactoring fixtures
refs #2600, refs #2379

Refactoring fixtures to make permission management a little easier
- Separate fixtures into JSON file and split permissions fixtures from other fixtures
- make fixture migrations more robust by fetching objects, not relying on
  ids and checking before adding
- changed owner fixture slightly to remove any confusion between the 'Owner' role and 'Ghost Owner' user.
- moved 003 fixture versions out of config into logic, possibly not a good
  idea
- refactored permissions fixtures and added permissions_roles fixtures to
  make it easier to read / add
2014-07-14 15:52:47 +01:00

110 lines
2.7 KiB
JSON

{
"permissions": {
"post": [
{
"name": "Edit posts",
"action_type": "edit"
},
{
"name": "Remove posts",
"action_type": "remove"
},
{
"name": "Create posts",
"action_type": "create"
}
],
"slug": [
{
"name": "Generate post slug",
"action_type": "generate"
},
{
"name": "Generate tag slug",
"action_type": "generate"
}
],
"db": [
{
"name": "Export database",
"action_type": "exportContent"
},
{
"name": "Import database",
"action_type": "importContent"
},
{
"name": "Delete all content",
"action_type": "deleteAllContent"
}
],
"user": [
{
"name": "Browse users",
"action_type": "browse"
},
{
"name": "Read users",
"action_type": "read"
},
{
"name": "Edit users",
"action_type": "edit"
},
{
"name": "Add users",
"action_type": "add"
},
{
"name": "Remove users",
"action_type": "remove"
}
],
"setting": [
{
"name": "Browse settings",
"action_type": "browse"
},
{
"name": "Read settings",
"action_type": "read"
},
{
"name": "Edit settings",
"action_type": "edit"
}
],
"theme": [
{
"name": "Browse themes",
"action_type": "browse"
},
{
"name": "Edit themes",
"action_type": "edit"
}
]
},
"permissions_roles": {
"Administrator": {
"post": "all",
"slug": "all",
"db": "all",
"user": "all",
"setting": "all",
"theme": "all"
},
"Editor": {
"post": "all",
"slug": "all",
"user": "all",
"setting": ["browse", "read"]
},
"Author": {
"post": ["add"],
"slug": "all",
"user": ["browse", "read"],
"setting": ["browse", "read"]
}
}
}