You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I need to set up a permission based on state parameters not only to state name, brief example you can access the state /places/:id only if the id is related to you.
I was able to handle this at steate level then i move to view level.
there are already some closed issues about this, but asking for "extra" stuff #431, #434 basically the problem is the same, handling permission based on some "data" constraint, that can be handled in states but not in views (at the moment)
try dynamic roles name try to create roles like house_id but not able to use it in permission-only
try static roles with parameter based validation, the validate role funtcion has no parameter and look at global obj PermTransitionProperties popolated on state change (and only on state change)
try to modified permission directive for override PermTransitionProperties but having two permission permission-sref usage in the same view take only the latest value of parameters (is a global object so is normal)
I think that having the same behavior both in state and view will be a big plus, bur removing the helper and passing to a map PermStatePermissionMap is tricky and can lead to breack compatibility,
what is your idea about that?
-----edit
modified authorizeByStateName passing extra params (options) that is propagated untile role/permission validation function (if not passed the helper for transition will be present), i will submit a PR in few
The text was updated successfully, but these errors were encountered:
Hello,
I need to set up a permission based on state parameters not only to state name, brief example you can access the state /places/:id only if the id is related to you.
I was able to handle this at steate level then i move to view level.
there are already some closed issues about this, but asking for "extra" stuff #431, #434 basically the problem is the same, handling permission based on some "data" constraint, that can be handled in states but not in views (at the moment)
I think that having the same behavior both in state and view will be a big plus, bur removing the helper and passing to a map PermStatePermissionMap is tricky and can lead to breack compatibility,
what is your idea about that?
-----edit
modified authorizeByStateName passing extra params (options) that is propagated untile role/permission validation function (if not passed the helper for transition will be present), i will submit a PR in few
The text was updated successfully, but these errors were encountered: