You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks!
(Any non-English issues will be closed immediately.)
Please provide your PHP and Swoole version. (php -v and php --ri swoole)
PHP 7.4.13
Swoole 4.5.9
Please provide your Laravel version.
8.21.0
Which release version of this package are you using?
2.6.68
What did you do? If possible, provide a recipe for reproducing the error.
We are using Bouncer for permission management. There is a function to test, if a user has an ability. This function is internal calling $this->gate()->allows($ability, $arguments);, so a Laravel gate function.
If a Swoole worker handle the request the first time, the function to check the ability, is always returning that the user didn't have this ability. Every request after that, the function to check is returning the correct result for the ability check.
I cannot explain why this does not work only with the first request. I also added the BouncerServiceProvider to the providers in the config, like mentioned in this issue. Is therefore maybe an explanation and a solution that also the first request is working?
The text was updated successfully, but these errors were encountered:
The problem is not depending on the request. The same request is first failing and after the first fail it is working, since all Bouncer permissions are loaded and cached.
Make sure you read Issues Guideline and answer these questions before submitting your issue. Thanks!
(Any non-English issues will be closed immediately.)
Please provide your PHP and Swoole version. (
php -v
andphp --ri swoole
)PHP 7.4.13
Swoole 4.5.9
Please provide your Laravel version.
8.21.0
Which release version of this package are you using?
2.6.68
What did you do? If possible, provide a recipe for reproducing the error.
We are using Bouncer for permission management. There is a function to test, if a user has an ability. This function is internal calling
$this->gate()->allows($ability, $arguments);
, so a Laravel gate function.If a Swoole worker handle the request the first time, the function to check the ability, is always returning that the user didn't have this ability. Every request after that, the function to check is returning the correct result for the ability check.
I cannot explain why this does not work only with the first request. I also added the BouncerServiceProvider to the providers in the config, like mentioned in this issue. Is therefore maybe an explanation and a solution that also the first request is working?
The text was updated successfully, but these errors were encountered: