From b46ed099d05fc916df256478ae5b2f72dbb51902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 14 Nov 2008 10:38:26 +0100 Subject: [PATCH] Allow root to by pass the mandatory accounts for issue550 --- account.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/account.py b/account.py index d077412a47..8ebb791e7f 100644 --- a/account.py +++ b/account.py @@ -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()