Closed abkrim closed 1 year ago
Finally I have seen the problem.
It is a silent error incident.
The model has a method that fails in certain scenarios
public function isSuperAdmin(): bool
{
return $this->is_superadmin
}
In a null
value in the is_superadmin
field the error was produced and in addition the failure in the management of Bouncer.
Fixed on typing
public function isSuperAdmin(): bool
{
return $this->is_superadmin ?: false;
}
Sorry for the inconvenience
Hello. First of all, thank you for the package, because I was looking for something like that, for a specific project.
When I went to try one of the things that mattered most to me, I ran into a problem that I don't know if it was an error of mine or something that's wrong.
It tries to apply an ability to a specific user on its own $user, the password modification.
I do return the user's abilities, and I do see the ability included, for the
id
entity, and itsUser
model but when I try to use the method to check if the user has that ability, it returns afalse
.I'm working on the tinker (before testing) and before starting refresh Bouncer
Bouncer::refresh();
proof of concept
Check ability get a
false
Create the user and then apply the ability with
This in the table
abilities
putFor me, it is a crucial point, since I need granularity in certain models, which each role can access, and edit according to their role.
Appreciated the help to see if I have to continue investigating or I did not understand the matter,