feat(kfet): block self deposit
This commit is contained in:
parent
982c82ba31
commit
e41b93e348
1 changed files with 7 additions and 0 deletions
|
@ -1171,6 +1171,13 @@ def kpsul_perform_operations(request):
|
||||||
operationgroup.amount += operation.amount
|
operationgroup.amount += operation.amount
|
||||||
if operation.type == Operation.DEPOSIT:
|
if operation.type == Operation.DEPOSIT:
|
||||||
required_perms.add("kfet.perform_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"),
|
||||||
|
}
|
||||||
|
)
|
||||||
if operation.type == Operation.EDIT:
|
if operation.type == Operation.EDIT:
|
||||||
required_perms.add("kfet.edit_balance_account")
|
required_perms.add("kfet.edit_balance_account")
|
||||||
need_comment = True
|
need_comment = True
|
||||||
|
|
Loading…
Add table
Reference in a new issue