Add support for restricted plugins

This commit is contained in:
Raphael Michel
2017-01-22 18:15:31 +01:00
parent 0665bd443b
commit fecc5ec307
3 changed files with 19 additions and 0 deletions

View File

@@ -42,6 +42,13 @@ configuration class. The metadata class must define the following attributes:
``description`` (``str``):
A more verbose description of what your plugin does.
``visible`` (``bool``):
``True`` by default, can hide a plugin so it cannot be normally activated.
``restricted`` (``bool``):
``False`` by default, restricts a plugin such that it can only be enabled for an event
by system administrators / superusers.
A working example would be::
# file: pretix/plugins/timerestriction/__init__.py
@@ -57,6 +64,8 @@ A working example would be::
name = _("PayPal")
author = _("the pretix team")
version = '1.0.0'
visible = True
restricted = False
description = _("This plugin allows you to receive payments via PayPal")