File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
3
3
"""Objects for User permission checks."""
4
+ from django .contrib .auth .models import User
5
+ from django .db .models import Q
4
6
5
7
from readthedocs .core .utils .extend import SettingsOverrideObject
6
8
@@ -13,7 +15,7 @@ def admins(cls, obj):
13
15
from readthedocs .organizations .models import Organization
14
16
15
17
if isinstance (obj , Project ):
16
- return project .users .all ()
18
+ return obj .users .all ()
17
19
18
20
if isinstance (obj , Organization ):
19
21
return obj .owners .all ()
@@ -24,7 +26,7 @@ def members(cls, obj):
24
26
from readthedocs .organizations .models import Organization
25
27
26
28
if isinstance (obj , Project ):
27
- return project .users .all ()
29
+ return obj .users .all ()
28
30
29
31
if isinstance (obj , Organization ):
30
32
return User .objects .filter (
Original file line number Diff line number Diff line change 3
3
from autoslug import AutoSlugField
4
4
from django .contrib .auth .models import User
5
5
from django .db import models
6
- from django .db .models import Q
7
6
from django .urls import reverse
8
7
from django .utils .crypto import salted_hmac
9
8
from django .utils .translation import ugettext_lazy as _
You can’t perform that action at this time.
0 commit comments