Skip to content

Conversation

westlakem
Copy link

I should warn I'm fairly new to the concept of promises (usually just use callbacks).

I could use some assistance with this as I'm not sure how the promises are used when they come out of the service.

If I do a PermissionService.getAllPermissions.then(function(result) {console.log(result)}) on the first ok.then call, it prints the correct information, but I am not sure if that is the desired output. So I added the 2nd ok.then on top of it to only return the relative information (model the permission is on, the role associated, and action allowed). I for some reason can't get it to return the collection in my console when I do PermissionService.getAllPermissions, and I'm not sure what I'm doing wrong.

This is a pull request because I feel there should be a way for admins to see what permissions have been granted to what roles easily.

I should warn I'm fairly new to the concept of promises (usually just use callbacks).

I could use some assistance with this as I'm not sure how the promises are used when they come out of the service.

If I do a PermissionService.getAllPermissions.then(function(result) {console.log(result)}) on the first ok.then call, it prints the correct information, but I am not sure if that is the desired output.  So I added the 2nd ok.then on top of it to only return the relative information (model the permission is on, the role associated, and action allowed).  I for some reason can't get it to return the collection in my console when I do PermissionService.getAllPermissions, and I'm not sure what I'm doing wrong.

This is a pull request because I feel there should be a way for admins to see what permissions have been granted to what roles easily.
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.

1 participant