Allow root to by pass the mandatory accounts for issue550
This commit is contained in:
+5
-4
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user