With a $user object, we can verify the user against a permission setting with the can() method. However, how can I retrieve all users who have a specific permission, including those under a group with the permission.
This needs to be generic PHP code as it's located in a service.