-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Add role endpoint #3196
Comments
I'll start with this as #3083 needs this. Unless someone already started it. |
Hm, would I be able to fake |
I see this endpoint as informative only. Everyone can query what roles are available to a permission and if the permission is faked the operation that uses the information will fail. The real check has to be done when a new user is invited/deleted. I think this endpoint doesn't need special permissions. But some thought has to be put into implementing the relation between roles and permissions. Sent from my iPhone
|
As discussed in IRC it would make more sense to use the permission that is needed instead of the role of the current user for the filter.
|
Note to self: user.related('roles').each(function (role) {});
|
To make available roles accessible by the frontend we need an endpoint to fetch all available roles.
GET /ghost/api/v0.1/roles/
: returns all available rolesAs second endpoint will be needed to get all roles a user is allowed to assign #3079.
GET /ghost/api/v0.1/roles/?permission=<my-role>
: returns all roles filtered by permissions. For example an admin will get all available roles except for the owner role and an editor will get the author role only. Implementation will have to be in accordance with User & Roles API: Who can invite what role #3083.The text was updated successfully, but these errors were encountered: