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

Include role permissions in /roles/{rolename}/members endpoint #1549

Merged
merged 1 commit into from Nov 11, 2015

Conversation

Projects
None yet
2 participants
@bernd
Member

bernd commented Nov 9, 2015

Move common code from UsersResource to UserRolesHelper.

Fixes #1529

@bernd bernd added this to the 1.2.3 milestone Nov 9, 2015

@bernd bernd force-pushed the issue-1529 branch from d8ebd5a to e9fc24d Nov 9, 2015

@joschi joschi self-assigned this Nov 10, 2015

this.inMemoryRolePermissionResolver = inMemoryRolePermissionResolver;
}
public Set<String> getRoleNames(User user) throws NotFoundException {

This comment has been minimized.

@joschi

joschi Nov 10, 2015

Contributor

This method should really be placed either in RoleService or in UserService (depending on the point of view, I'd place it in UserService).

);
}
public List<String> getPermissionsForUser(User user) {

This comment has been minimized.

@joschi

joschi Nov 10, 2015

Contributor

Same here, I'd move this class into UserService or RoleService.

@bernd bernd force-pushed the issue-1529 branch from e9fc24d to 3bdfd97 Nov 11, 2015

idMap = roleService.loadAllIdMap();
} catch (NotFoundException e) {
LOG.error("Unable to load role ID map. Using empty map.", e);
idMap = new HashMap<>();

This comment has been minimized.

@joschi

joschi Nov 11, 2015

Contributor

Minor nitpick: This could be Collections.emptyMap()

Include role permissions in /roles/{rolename}/members endpoint
Move common code from UsersResource to UserService.

Fixes #1529

@bernd bernd force-pushed the issue-1529 branch from 3bdfd97 to 0776393 Nov 11, 2015

@joschi

This comment has been minimized.

Contributor

joschi commented Nov 11, 2015

LGTM. 👍

joschi added a commit that referenced this pull request Nov 11, 2015

Merge pull request #1549 from Graylog2/issue-1529
Include role permissions in "/roles/{rolename}/members" endpoint

@joschi joschi merged commit afa42b0 into 1.2 Nov 11, 2015

3 checks passed

ci Jenkins build graylog2-server-integration-pr 347 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@joschi joschi deleted the issue-1529 branch Nov 11, 2015

joschi added a commit that referenced this pull request Nov 11, 2015

Merge pull request #1549 from Graylog2/issue-1529
Include role permissions in "/roles/{rolename}/members" endpoint
(cherry picked from commit afa42b0)

joschi added a commit that referenced this pull request Nov 11, 2015

Merge pull request #1549 from Graylog2/issue-1529
Include role permissions in "/roles/{rolename}/members" endpoint
(cherry picked from commit afa42b0)

@joschi joschi modified the milestones: 1.2.3, 1.3.0 Nov 23, 2015

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