question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[x] Feature request
[ ] Documentation issue or request

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:

<button [disabled]="'changeSomethingPermission' | ngxPermission">Change</button>

I understand this might not be the most elegant design, but it would fit easily to any attribute, even component input ones.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Nosfistiscommented, Dec 29, 2019

I don’t really see a case where both are needed. In the original directives, I also find the case of both [ngxPermissionsExcept]="['ADMIN', 'JOHNY']" and [ngxPermissionsOnly]="['MANAGER']" weird; doesn’t it mean only 'MANAGER' can view that div?

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>
0reactions
denes16commented, Apr 6, 2022

Any news on this?. I can create a pr, but please let me know where i have to start.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change permission of anonymous pipe?
So far I've found the following workaround using named FIFO: $ mkfifo -m 600 fifo $ cat ~/.ssh/id_rsa >fifo | ssh-add fifo Identity...
Read more >
What are pipe members and permission options
Pipe permissions are not directly related to your company permissions. Each pipe's permissions can be managed separately, allowing you to choose who will ......
Read more >
Users, Groups, and Permissions – Files, Pipes, and ...
A user is what you'd expect: a user of the system. The user will have access to various files and not others. This...
Read more >
Access permissions in named pipes - Stack Overflow
I have this simple code that passes a value from child process to parent using named pipe. Code:
Read more >
Setting named pipe permission on Windows - Sybase Infocenter
Setting named pipe permission on Windows · Go to Control Panel | Administrative Tools | Local Security Policy | Local Policies | Security...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found