feat(kfet): block self deposit #849

Merged
thubrecht merged 1 commit from no-auto-chargement into cof-staging 2025-01-23 22:48:07 +01:00
Showing only changes of commit ee61ed97d2 - Show all commits

View file

@ -1180,6 +1180,13 @@ def kpsul_perform_operations(request):
operationgroup.amount += operation.amount
if operation.type == Operation.DEPOSIT:
required_perms.add("kfet.perform_deposit")
if request.user.profile.account_kfet == on_acc:
data["errors"].append(
{
"code": "auto_deposit",
"message": ("Impossible de charger son propre trigramme"),
Review

Pas besoin des parenthèses ici

Pas besoin des parenthèses ici
}
)
if operation.type == Operation.EDIT:
required_perms.add("kfet.edit_balance_account")
need_comment = True