ocket8888 commented on a change in pull request #4196: TP: Provides the ability
to view all users for a given role
URL: https://github.com/apache/trafficcontrol/pull/4196#discussion_r375927225
##########
File path: traffic_portal/app/src/modules/private/roles/users/index.js
##########
@@ -30,8 +30,8 @@ module.exports =
angular.module('trafficPortal.private.roles.users', [])
roles:
function($stateParams, roleService) {
return
roleService.getRoles({ id: $stateParams.roleId });
},
- roleUsers:
function($stateParams, userService) {
- return
userService.getUsers({ roleId: $stateParams.roleId });
+ roleUsers:
function(roles, userService) {
+ return
userService.getUsers({ role: roles[0].name });
Review comment:
```javascript
const roles = [];
console.log(roles[0].name); //TypeError: cannot read property 'name' of
undefined
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services