Conversation
|
I know #2156 is in flight for loading package.json in a standard way. I can update this to use that when it lands. Should just mean I replace my current My plan was that once this is reviewed and in place we can either put it into the permissions tables and refresh canThis or pass it to the proxy to manage. If the proxy handles this, I'll refactor proxy.js into a class that takes the app name and permissions and adds checks before the api calls, each app would get their own instance of the proxy then. |
|
I'm gonna be honest. I don't want to use If you want I can put together another PR to clean up that file and then use it here. |
|
@jgable Picked that up literally 5 minutes before you mentioned it :-) |
refs TryGhost#2179, TryGhost#2156 - Replace extend with _.extend
|
@jgable is there something missing from this PR due to |
|
I want to refactor that require-tree before I use it so I don't have to call readAll, just haven't had time yet. I'm hoping to get to it today. |
Progress on TryGhost#2095 - Add new AppPermissions class with read() method - has default permissions to read and browse posts - uses default permissions if no package.json - uses default permissions if no ghost object in package.json - errors when reading malformed package.json - uses ghost.permissions if found in package.json
|
Updated Refactored to use parsePackageJson from require-tree. Still a little weird to pass messages around instead of just have it reject the deferred. |
|
This is now on 003-data-updates |
Why are we doing this? Is it to prevent require-tree from requiring errorHandling.js? |
|
I think it's just a legacy implementation thing. I guess it's because more than one error could happen and didn't want to reject with an array of errors. |
|
This has been remerged onto the apps-perms branch which is basically master with all the data changes on it. |
Progress on #2095 and #2059
uses default permissionserrors when reading malformed package.json