I am writting my own auth drivers, and I have some problems with checking the permissions from a group driver.
The actual code, I am running:
Auth::group()->has_access('post.read', null);
This way the group driver should check all logged in driver's all group driver's group, since there is no group given, but it does not.
Actually I found the reason: Auth_Group_Driver, line 93:
if ($this instanceof $g_id[0])
It tries to check for an instance, but the given parameter is only the name of the group driver, since it is from get_groups(). Is it a bug, or I am missing something?
You might have to do some debugging, as Jelmer, who wrote the Auth package, is no longer part of the team, we'll have to dive into it as well, trying to understand why it was implemented this way.
Don't trust the Auth documentation. I wrote is using "reverse engineering" because Jelmer never documented it. And I might have missed something that only exists in his brain...
I checked the comments in the code as well. Are them written by Jelmer? Because the comments confirm that it doesn't return an instance, but a driver_id, and that instanceof operator is the only thing, that expects an instance.