User permissions not revoked in laravel/dusk browser scope #2128
dmvpformation
started this conversation in
General
Replies: 1 comment 1 reply
-
I currently don't have the time to investigate this further. Feel free to submit a PR that fixes the problem for you. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
We encountered a bug while testing permissions access with laravel/dusk and your package.
It's quite basic, we revoke permissions of a user, login and then close a tutorial modal. The problem is that when we check the permission that is supposed to be revoked in the dusk process, the user still has this permission. Though, it is not listed when printing permissions via
getPermissionNames
on both Role and User objects. We checked that it is revoked before starting to browse and it is.Our guess is that there is a different scope or some kind of cache that still gives this permission to our user, but we cannot figure out where or how.
The behavior of the bug is pretty erratic. It is not consistent on every environment, plus it disappeared on some environments after an update of your package to version 5.5.4. However, it is consistent in our gitlab-ci, it keeps triggering on this precise unique test.
SetUp of dusk test:
Permissions revoking:
Dusk test browse:
Versions
You can use
composer show
to get the version numbers of:Expected behavior
We expect the permissions to be revoked and stay revoked inside the browser test.
Environment (please complete the following information, because it helps us investigate better):
Beta Was this translation helpful? Give feedback.
All reactions