Skip to content

Conversation

@bajtos
Copy link
Member

@bajtos bajtos commented Nov 30, 2016

Currently the return type of Role.getRoles() method is inconsistent: role names are returned for smart roles and role ids are returned for static roles (configured through user-role mapping).

This commit adds a new option to Role.getRoles() allowing the caller to request role names to be returned for all types of roles.

Backport #2975

cc @ebarault

Currently the return type of Role.getRoles() method is inconsistent:
role names are returned for smart roles and role ids are returned for
static roles (configured through user-role mapping).

This commit adds a new option to Role.getRoles() allowing the caller
to request role names to be returned for all types of roles.
@bajtos bajtos self-assigned this Nov 30, 2016
@bajtos bajtos added the #review label Nov 30, 2016
@bajtos bajtos merged commit 63df861 into 2.x Nov 30, 2016
@bajtos bajtos deleted the backport/returnOnlyRoleNames branch November 30, 2016 16:23
@bajtos bajtos removed the #review label Nov 30, 2016
@bajtos bajtos changed the title Add "returnOnlyRoleNames" option to Role.getRoles Add "returnOnlyRoleNames" option to Role.getRoles [2.x] Nov 30, 2016
@ebarault
Copy link
Contributor

ebarault commented Dec 2, 2016

@bajtos : we should update the doc to reflect this option, this should land in the api doc, here. but also we could update the security section to add more details and examples on Role, ACL, AccessTokens methods ?

@bajtos
Copy link
Member Author

bajtos commented Dec 5, 2016

@ebarault sure, updating docs is a good idea! Would you mind contributing those changes yourself?

(EDITED) API docs are generated from the jsdoc comments in the code. The section Role.getRoles() is generated from this comment. I guess I should have asked you to include the documentation changes in this pull request 😄

The content of "security section" can be edited here: https://github.com/strongloop/loopback.io/blob/gh-pages/pages/en/lb2/Authentication-authorization-and-permissions.md

@ebarault
Copy link
Contributor

ebarault commented Dec 5, 2016

@bajtos : sure, happy to help. I will propose additions in the coming days

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants