Hey! First at all I am not sure if this is a feature suggest, or just a question. I have searched the previous issued with no luck.
I am building a organization based app on which there are a set of permissions (i.e. listItems, viewDetails etc) but are linked to each organization the user can access (orgA, orgB). This is, it may be the case the user can listItems of one organization (orgA), but not from another (orgB).
The best way I've found so far is to define the permission, and on the handler check the transitiontoParams and put there my logic.
This approach works fine when accessing states, but when checking a from a directive like permission-only, the toParams is obviously empty. This is specially handful when certain actions are not performed in a separate state, like for example, creating a user within an organization may happen inside a dialog and the app should show the button to open this dialog.
What is the best approach to define a permission that is dependant of one (or more parameters)? Maybe the directives and/or states could send parameters, the same way angular events pass a data object to the handler.
This not the scope of this lib. To persist data between state use angular service or factory patterns that are injectable and controlled independently.
Hey! First at all I am not sure if this is a feature suggest, or just a question. I have searched the previous issued with no luck.
I am building a organization based app on which there are a set of permissions (i.e. listItems, viewDetails etc) but are linked to each organization the user can access (orgA, orgB). This is, it may be the case the user can listItems of one organization (orgA), but not from another (orgB).
The best way I've found so far is to define the permission, and on the handler check the transition
toParams
and put there my logic.This approach works fine when accessing states, but when checking a from a directive like
permission-only
, thetoParams
is obviously empty. This is specially handful when certain actions are not performed in a separate state, like for example, creating a user within an organization may happen inside a dialog and the app should show the button to open this dialog.What is the best approach to define a permission that is dependant of one (or more parameters)? Maybe the directives and/or states could send parameters, the same way angular events pass a data object to the handler.
i.e.