Skip to content

Permissions

hypha.apply.determinations.permissions

can_edit_determination

can_edit_determination(user, determination, submission)
Source code in hypha/apply/determinations/permissions.py
def can_edit_determination(user, determination, submission):
    if submission.is_archive:
        return False
    outcome = transition_from_outcome(determination.outcome, submission)
    valid_outcomes = determination_actions(user, submission)
    return outcome in valid_outcomes

can_create_determination

can_create_determination(user, submission)
Source code in hypha/apply/determinations/permissions.py
def can_create_determination(user, submission):
    if submission.is_archive:
        return False
    actions = determination_actions(user, submission)
    return any(action in DETERMINATION_OUTCOMES for action in actions)