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

Add support for roles and permissions #344

Merged
merged 8 commits into from
Mar 27, 2019
Merged

Conversation

pushpabrol
Copy link
Member

@pushpabrol pushpabrol commented Mar 14, 2019

Changes

  • Added RolesManager for managing roles and the permissions within those roles
  • Changed UserManager to add user specific roles and permission tasks
    -Changed management/index.js

References

Testing

Add test/management/roles.tests.js and modified test/management/users.tests.js

  • This change adds unit test coverage

  • This change adds integration test coverage

Checklist

All new tests complete without errors but some old tests seem to be erroring out

@luisrudge
Copy link
Contributor

@pushpabrol can you check the missing test coverage? thanks for the pr 🎉

@luisrudge luisrudge added this to the v2.17.0 milestone Mar 27, 2019
@luisrudge luisrudge changed the title Changes to support roles and permissions Add support for roles and permissions Mar 27, 2019
@luisrudge luisrudge merged commit 8320a45 into auth0:master Mar 27, 2019
@jfbaraky
Copy link

jfbaraky commented May 6, 2019

That's also possible to add permissions on Auth0 APIs?
Like:
https://auth0.com/docs/api/management/guides/apis/update-permissions-apis (create page is broken)

@jfbaraky
Copy link

jfbaraky commented May 8, 2019

@luisrudge not in the role. I need to add the permission in a custom API.

Add the permission to the role was enough to use the application and give the right permissions to the users, but on Postman tests, when I get the token, I can only get permissions defined on API, since is a machine-to-machine flow.

Today I can do using this way, but it's very time consuming and hard to maintain between the different environments.

@jfbaraky
Copy link

jfbaraky commented May 8, 2019

@luisrudge, I've founded how to do it: update the resource server defining the scopes. You don't need to create the permission, just update the server adding it to the array of scopes. Also, it's hard to find the answers when the frontend and backend don't have the same names for the same things :(

http://auth0.github.io/node-auth0/module-management.ManagementClient.html#updateResourceServer

@luisrudge
Copy link
Contributor

I agree with you that it's confusing that the frontend calls resource servers as APIs :( but I'm glad you found it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants