Skip to content

Permissions

hypha.apply.api.v1.permissions

IsAuthor

Bases: BasePermission

has_object_permission

has_object_permission(request, view, obj)
Source code in hypha/apply/api/v1/permissions.py
def has_object_permission(self, request, view, obj):
    return obj.user == request.user

IsApplyStaffUser

Bases: BasePermission

Custom permission to only allow organisation Staff or higher

has_permission

has_permission(request, view)
Source code in hypha/apply/api/v1/permissions.py
def has_permission(self, request, view):
    return request.user.is_apply_staff

has_object_permission

has_object_permission(request, view, obj)
Source code in hypha/apply/api/v1/permissions.py
def has_object_permission(self, request, view, obj):
    return request.user.is_apply_staff

IsFinance1User

Bases: BasePermission

has_permission

has_permission(request, view)
Source code in hypha/apply/api/v1/permissions.py
def has_permission(self, request, view):
    return request.user.is_finance

has_object_permission

has_object_permission(request, view, obj)
Source code in hypha/apply/api/v1/permissions.py
def has_object_permission(self, request, view, obj):
    return request.user.is_finance

HasDeliverableEditPermission

Bases: BasePermission

has_permission

has_permission(request, view)
Source code in hypha/apply/api/v1/permissions.py
def has_permission(self, request, view):
    invoice = view.get_invoice_object()
    return invoice.can_user_edit_deliverables(request.user)