-
Notifications
You must be signed in to change notification settings - Fork 128
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
Role Based Component #58
Comments
Hi @lemontreess check out this guide https://github.com/AlexKhymenko/ngx-permissions/wiki/common-use-cases#disable-element |
But the button is in the component。 I want to make the button disable in the component。 |
I understand Do you consider doing like this
And then just pass permissions to component via input
|
But if this component is already packaged |
Sorry i can't write code right now. But preudo code will be find button in templateRef and then disable it. |
Thank you for your answer。Although I still don't understand |
@lemontreess Sorry i have like no time at all ... as soon as i will have some time i will help You. |
@AlexKhymenko I have three roles: ADMIN, MANAGER, and USER. Each roles has a set of permissions. So I am setting three roles with their permissions like below and I want to display the link only if the ADMIN or MANAGER logged in. How can I implement that in angular 6? I cannot see any example which shows how set permission based on a role. |
@cubet-rahul Do you have any progress on this? I'm trying same thing but I can only use roles for authentication. Permissions seems useless or I couldn't use it properly. |
Hi, if I can help :
In addition, if this doesn't fit your needs, you can provide a validation function when defining role and/or permission. Hope it helps |
The latest version (8.1.0) released a few days ago adds this possibility, doesn't it? Roles seem to be fully supported? I haven't been able to test or look at it in detail yet. https://github.com/AlexKhymenko/ngx-permissions/releases/tag/v8.1.0 |
@GitHubish use the latest version 8.1.1 |
``
I'm submitting a...
Current behavior
Hi Alex,
I am happy to use your library in project!
Could you help me please with one question?
I want the button in the component to disable. What should I do?
The text was updated successfully, but these errors were encountered: