chaosdorf / mete

Matekasse
MIT License
47 stars 40 forks source link

Allow users to opt-out of overdrafting #87

Open YtvwlD opened 4 years ago

YtvwlD commented 4 years ago

To achieve this there's a new user attribute: can_overdraw. This is enabled by default for all new and existing users. If this is set to false, this user's balance can go below zero. Drinks are hidden from the user page when their price is higher then the user's balance and the user has can_overdraw disabled.

This is not yet fully exposed via the API - the attribute is returned but can't be changed and the validation is still being performed. This has to be added before merging this PR.