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.

Passing a variable as permission

See original GitHub issue

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

Current behavior

element doesn’t switch its status (from invisible to visible or vice versa) if the permissions are dynamic.

if I have a button like this: <button *ngxPermissionsOnly="some_permissions"> add Button</button> some_permissions is a variable which changes as the route changes, the button save its status and doesn’t switch on or off.

Expected behavior

the DOM element must change its status as the variable changes.

Minimal reproduction of the problem with instructions


Angular version: 6.2.5
ngx-permissions version: 6.0.2

- [x] Chrome (desktop) version 70.0
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

AlexKhymenkocommented, Oct 22, 2018

@ITEANJD Fix it in version 6.0.4

AhmedNourJamalElDincommented, Oct 23, 2018

I think it works, but I’m going to test it more then I will tell you if it works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pass a variable between multiple custom permission classes ...
1. Some ideas: 1) You could set an attribute on the view parameter to has_permission(), and retrieve it in the subclassed version. ·...
Read more >
How can I pass a variable command line arguments to a DOS ...
I am trying to pass variables to icacls using a Powershell 3 script running on Windows 2008 R2 SP1. This works in my...
Read more >
bash - Trying to get path into variable; permission denied
I would like to iterate through each group and temporarily store the paths to the files as text variables (to be used with...
Read more >
Variable permission (message) in commands - skUnity Forums
I'm trying to use permissions based on a stirng in a command to check if a player ... send "&cYou don't have permission...
Read more >
IAM policy elements: Variables and tags - AWS Documentation
Use AWS Identity and Access Management (IAM) policy variables as ... However this permission is granted only if the URL matches their AWS...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found