Beispiel #1
0
def manager_proposition_dissertations_role_delete(request, pk):
    prop_role = proposition_role.get_by_id(pk)
    if prop_role is None:
        return redirect('manager_proposition_dissertations')
    proposition = prop_role.proposition_dissertation
    prop_role.delete()
    return redirect('manager_proposition_dissertation_detail', pk=proposition.pk)
Beispiel #2
0
def proposition_dissertations_role_delete(request, pk):
    prop_role = proposition_role.get_by_id(pk)
    if prop_role is None:
        return redirect('proposition_dissertations')
    proposition = prop_role.proposition_dissertation
    adv = get_current_adviser(request)

    if prop_role.status != 'PROMOTEUR' and (proposition.author == adv or proposition.creator == adv.person):
        prop_role.delete()

    return redirect('proposition_dissertation_detail', pk=proposition.pk)
Beispiel #3
0
def proposition_dissertations_jury_edit(request, pk):
    prop_role = proposition_role.get_by_id(pk)
    if prop_role is None:
        return redirect('proposition_dissertations')
    proposition = prop_role.proposition_dissertation
    return redirect('proposition_dissertation_detail', pk=proposition.pk)
Beispiel #4
0
def manager_proposition_dissertations_jury_edit(request, pk):
    prop_role = proposition_role.get_by_id(pk)
    redirect_if_none(proposition_role, 'manager_proposition_dissertations')
    proposition = prop_role.proposition_dissertation
    return redirect('manager_proposition_dissertation_detail',
                    pk=proposition.pk)