ensure user is tested

This commit is contained in:
Matthias Mair 2026-04-03 01:48:31 +02:00
parent cda4a99f5d
commit dcc4b9e365
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
1 changed files with 3 additions and 3 deletions

View File

@ -223,20 +223,20 @@ def update_plugins_file(package_reference: str, remove: bool = False):
def install_plugin(
user,
url: Optional[str] = None,
packagename: Optional[str] = None,
user=None,
version: Optional[str] = None,
):
"""Install a plugin into the python virtual environment.
Args:
user: user performing the installation
packagename: Optional package name to install
url: Optional URL to install from
user: Optional user performing the installation
version: Optional version specifier
"""
if user and not user.is_staff:
if not user or not user.is_staff:
raise ValidationError(_('Only staff users can administer plugins'))
if settings.PLUGINS_INSTALL_DISABLED: