Allow root to by pass the mandatory accounts for issue550

This commit is contained in:
Cédric Krier
2008-11-14 10:38:26 +01:00
parent 7f56b0323d
commit b46ed099d0
+5 -4
View File
@@ -393,10 +393,11 @@ class AccountSelection(OSV):
if account.root.id in roots:
return False
roots.append(account.root.id)
for account in root_accounts:
if account.mandatory:
if not account.id in roots:
return False
if user: #Root can by pass
for account in root_accounts:
if account.mandatory:
if not account.id in roots:
return False
return True
AccountSelection()