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

Added transition to the guard call #121

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

willemo
Copy link

@willemo willemo commented Jun 20, 2016

I've added the current transition to the guard call, so the guard can be aware of the transition being applied. You can then just define your guard like this: function($stateMachine, $transition).

@johnkary
Copy link

+1 My team would also love if this feature were merged. It allows our Transition guard callbacks to be made aware of runtime $parameters such as currently logged in user object or the result of other permission checks. For example, if the currently logged in user does not have a specific Role/Permission (boolean result injected via $parameter) the guard callback returns false.

@yohang What can we do to have this feature added? It does not break BC.

@Dudemullet
Copy link

@yohang any plans on adding this ?

@zhanghuanchong
Copy link

+1

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.

4 participants