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

Support asynchronous abilities #182

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

Conversation

anehx
Copy link

@anehx anehx commented Jul 24, 2024

As mentioned in multiple issues (#160, #20), ember-can currently doesn't support async abilities. This seems to be an issue for a lot of its users as it is a real use-case that permissions are evaluated with e.g. a call to an API.

This PR would support async abilities without changing the current API at all. The only thing required for it to work in templates would be ember-promise-helpers to handle the promises in the templates.

This solution is currently running in one of my projects and works pretty good. Please let me know if you are interested in this. If this is a viable solution, we could also look into changing the template helpers so they can handle the promises itself in order to drop the necessary dependency.

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