• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

liqd / adhocracy-plus / 18908688697

29 Oct 2025 12:59PM UTC coverage: 44.622% (-44.5%) from 89.135%
18908688697

Pull #2986

github

web-flow
Merge 1dfde8ee7 into 445e1d498
Pull Request #2986: Draft: Speed up Github Ci Tests

3012 of 6750 relevant lines covered (44.62%)

0.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/apps/users/decorators.py
1
from django.contrib.auth.decorators import user_passes_test
×
2

3
from apps.organisations.models import Organisation
×
4

5

6
def user_is_project_admin(view_func):
×
7
    """Projet admin view decorator.
8

9
    Checks that the user is an admin, moderator or initiator of any project.
10
    """
11
    return user_passes_test(
×
12
        _user_is_project_admin,
13
    )(view_func)
14

15

16
def _user_is_project_admin(user):
×
17
    is_initiator = Organisation.objects.filter(initiators__id=user.id).exists()
×
18
    return user.is_active and (user.is_superuser or is_initiator)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc