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 capability to list all permissions #239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add capability to list all permissions #239

wants to merge 1 commit into from

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.

None yet

1 participant