Coverage for src/ptf_tools/utils.py: 100%
5 statements
« prev ^ index » next coverage.py v7.7.0, created at 2025-04-03 12:11 +0000
« prev ^ index » next coverage.py v7.7.0, created at 2025-04-03 12:11 +0000
1from ptf_tools.templatetags.tools_helpers import get_authorized_collections
4def is_authorized_editor(user, colid):
5 colids = get_authorized_collections(user)
6 is_authenticated = user.is_active and user.is_authenticated
7 return is_authenticated and (colid in colids or user.is_staff)