added disabling facility for user accounts

This commit is contained in:
Radu Ioan Fericean
2014-01-28 12:22:50 +02:00
parent 6a251c2b2c
commit a5fad89574
4 changed files with 15 additions and 3 deletions

View File

@@ -39,6 +39,9 @@ type ActionTrigger struct {
}
func (at *ActionTrigger) Execute(ub *UserBalance) (err error) {
if ub.Disabled {
return fmt.Errorf("User %s is disabled", ub.Id)
}
// does NOT need to Lock() because it is triggered from a method that took the Lock
var aac Actions
aac, err = accountingStorage.GetActions(at.ActionsId, false)