Add app permission checking to canThis#2199
Conversation
- Pass permissions loading to buildObjectTypeHandlers to eliminate shared state - Load both app and user permissions to check - Check app permissions if present - Create apps table and App model - Move effectiveUserPermissions to permissions/effective - Change permissable interface to take context; user and app. - Add unit tests for app canThis checks and effective permissions
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
We seem to have some weird testing failures again: https://travis-ci.org/TryGhost/Ghost/builds/18947660 |
|
The 500 error is due to the handoff between 2 sets of tests I believe, the 'should' error I'm not sure about - I try to track them in #1702. They have certainly become more common. |
|
👍 good to merge. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
I'm planning to merge this out onto a branch temporarily whilst we wait for #2102. I don't want to leave it on a branch for long because it'll get hard to merge, equally, merging into master would mean either doing 2 data version bumps or having a rough ride in master for a while and it would be good to avoid those things. At least if it's on a branch rather than in a PR it's my job to keep it rebased and not yours :) |
|
Sounds good. Just let me know if you run into any snags. |
|
This is merged on the 003-data-updates branch - which we are now definitely using so closing this. |
|
This has been remerged onto the apps-perms branch which is basically master with all the data changes on it. |
Progress on #2059
Not really sure if I'm doing the schema stuff correctly, so feel free to review that.
In order to start using this #2179 will need merged, and then we'll need to push the loaded permissions into the database during app loading. I thought this was big enough by itself without adding that stuff in.