This function allows you to restrict the authorizations for the widget in addition to the categories. The method returns a boolean value, which decides whether the widget should be displayed for the respective user.
Example with the API-User object: Provide the widget only to specific users or Job Functions
public function isAuthorized()
{
return $this->getUser()->getUsername() == 'admin' || $this->getUser()->isInJobFunction('development');
}