Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions Migrations #3910

Closed
ErisDS opened this issue Sep 1, 2014 · 4 comments
Closed

Permissions Migrations #3910

ErisDS opened this issue Sep 1, 2014 · 4 comments
Labels
affects:api Affects the Ghost API

Comments

@ErisDS
Copy link
Member

ErisDS commented Sep 1, 2014

At present, we have no system by which permissions can be added to the permissions.json file and safely migrated.

We need to design a system which allows permissions to be added, so that we can add new permissions for the configuration API, apps API, and any other endpoints which we need to create.

It is expected that if we create a situation where a permission needs to be changed or removed, that the migration system would have to be updated to manage those cases.

At present, permissions migrations are triggered as a part of the migration system, which requires that the database version be bumped. Whether or not this should be required in future is up for discussion.

If we continue to use the version bumping to trigger a migration, then we need to protect the schema.js, fixtures.json and permissions.json files from being updated without a version bump in some way - possibly via a simple test which checks the content.

@ErisDS ErisDS added this to the 0.5.x Feature Release Backlog milestone Sep 1, 2014
@ErisDS ErisDS added the help wanted [triage] Ideal issues for contributors to help with label Oct 29, 2014
@ErisDS
Copy link
Member Author

ErisDS commented Oct 29, 2014

Does anyone have any good ideas about how to go about this?

My major concern is that we expect apps to modify permissions - so how do we manage not overwriting app changes? Or should we just not care for now and assume permissions should be exactly as we set them, and that anyone changing them has to re-change them after a migration?

@letsjustfixit
Copy link
Contributor

Any news on this?

@ErisDS ErisDS modified the milestone: Next Backlog Oct 9, 2015
@ErisDS ErisDS added permissions and removed help wanted [triage] Ideal issues for contributors to help with labels Oct 9, 2015
@ErisDS
Copy link
Member Author

ErisDS commented Oct 9, 2015

Labelling all the open permissions related issues (there are several) with both permissions and later as I'm working on a spec to solve the immediate issues as well as a long term plan, which will replace all of these issues.

@ErisDS ErisDS closed this as completed Oct 9, 2015
@ErisDS ErisDS added help wanted [triage] Ideal issues for contributors to help with later [triage] Things we intend to work but are not immediate priority and removed permissions labels Oct 9, 2015
@ErisDS ErisDS removed help wanted [triage] Ideal issues for contributors to help with later [triage] Things we intend to work but are not immediate priority labels Mar 25, 2016
@ErisDS
Copy link
Member Author

ErisDS commented Mar 25, 2016

Removed the "later" and "fix wanted" labels from this now. We no longer need to reopen this later as the refactoring work done in #6572 has made it possible to do permission migrations the same as any other fixture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:api Affects the Ghost API
Projects
None yet
Development

No branches or pull requests

2 participants