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

permission-sref with dynamic access #431

Open
hdi-amiri opened this issue Jul 23, 2017 · 1 comment
Open

permission-sref with dynamic access #431

hdi-amiri opened this issue Jul 23, 2017 · 1 comment

Comments

@hdi-amiri
Copy link

hdi-amiri commented Jul 23, 2017

Hi
If I have dynamic access like following

            data: {
                permission: {
                    only: function (transitionProperties) {
                        if (transitionProperties.toParams.type === "A") {
                            return [PERMISSIONS.A];
                        } else if (transitionProperties.toParams.type === "B") {
                            return [PERMISSIONS.B];
                        }
                    }
                }
            }

I cannot use permission-sref in my view, any workaround for this?

@AesSedai
Copy link

AesSedai commented Aug 7, 2017

+1, the data.permission.only function only runs when the transition is attempted instead of running with

<div permission permission-sref="'state'"></div>

in the view.

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

No branches or pull requests

2 participants