Add is_available hook for plugin configs

This commit is contained in:
Raphael Michel
2019-01-12 14:10:56 +01:00
parent 75a966529e
commit d5ac155914
5 changed files with 13 additions and 5 deletions

View File

@@ -95,7 +95,7 @@ class EventSerializer(I18nAwareModelSerializer):
from pretix.base.plugins import get_all_plugins
plugins_available = {
p.module for p in get_all_plugins()
p.module for p in get_all_plugins(self.instance)
if not p.name.startswith('.') and getattr(p, 'visible', True)
}