-
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
Permission pipe #124
Comments
@Nosfistis This is great idea the pipe will only return true or false.. In this case problem with angular material would be fixed. But i actually need to find time for this. Probably after New Year :-) |
Great! If you need any help I can prep a PR. |
@Nosfistis If You have PR please submit it :-) |
@Nosfistis I actually started figuring out. But i have some problems with API. How You want to use it. |
I don't really see a case where both are needed. In the original directives, I also find the case of both If need be, one can combine the 2 pipes using: <button [disabled]="('changeSomethingPermission' | ngxPermissionOnly) && ('changeSomethingElsePermission' | ngxPermissionExcept)">Change</button> Then there is another idea of having the permissions as pipe argument: <button [disabled]="permissionService.permissions$ | async | ngxPermission:'changeSomethingPermission'">Change</button> |
@AlexKhymenko hello, can you share your WIP version for now, please? |
@tplk it was on old computer. Now its lost forever :-( |
Any news on this?. |
I'm submitting a...
While the directive usage is fine, sometimes it's useful having attributes based on permissions. For example, disabling a link cannot be done using directives. A better option would be an impure pipe permission,, returning
true/false
like so:I understand this might not be the most elegant design, but it would fit easily to any attribute, even component input ones.
The text was updated successfully, but these errors were encountered: