Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions readthedocs/core/templatetags/privacy_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ def is_member(user, project):
return AdminPermission.is_member(user, project)


@register.filter
def admins(obj):
"""
Return admin users on the object.

The object could an Organization or a Project.
"""
return AdminPermission.admins(obj)


@register.simple_tag(takes_context=True)
def get_public_projects(context, user):
# 'Exists()' checks if the project has any good builds.
Expand Down