Coverage for sites/ptf_tools/ptf_tools/utils.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2024-07-18 09:02 +0000

1from ptf_tools.templatetags.tools_helpers import get_authorized_collections 

2 

3 

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)