I want to discuss usage of
is_available()
in notification methods. So far there is no method that uses auth class. So everything works normally, but I have added a new method which now looks like this:
Code: Select all
...
public function is_available()
{
return $this->auth->acl_get('...');
}
...
is_available()
is used in \phpbb\notification\manager::get_default_methods()
. This method is used in almost all notification types to decide what notification methods will be used to notify users.Now the problem is, that
get_default_methods()
uses sender's auth to decide what methods should receiver get. Therefore if sender is not allowed to use the method, receiver won't get the notification.Can anyone tell me if this is really desired state and I should not be using auth in
is_available()
or it's a bug but no one cared yet because no one used auth yet?