mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
80f9023020
Closes #3196 * adds `/roles/` endpoint * is given the current user as context * wraps everything in a canthis.browse.role * gets all the available roles (should "Owner" be filtered out?) * optional parameter: `permission=assign`. Gets all roles authenticated user could assign * if we're not signed in, gives a "please sign in" (standard) error * if we're signed in, but user is not in the context, gives a "there was no user in the context" error * if the user is an "Author", gives a "there are no available roles to assign" error * implemented hacky filter because when.js produces heisenbugs past 3.2.3 (when.filter not available) * added extra fixtures to `permissions.json`. Might need a migration. Caveats: * there are no tests * for some reason the setup functional test was failing for me locally |
||
---|---|---|
.. | ||
accesstoken.js | ||
app.js | ||
appField.js | ||
appSetting.js | ||
base.js | ||
basetoken.js | ||
client.js | ||
index.js | ||
permission.js | ||
post.js | ||
refreshtoken.js | ||
role.js | ||
settings.js | ||
tag.js | ||
user.js |