From 3b8ebf68a6b02dd72f4c60c533ab65e5151f37cb Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 8 May 2011 21:36:10 +0100 Subject: [PATCH] GTK UI menubar accounts retrieval. Only ask for known accounts if we have the required level for it. --- deluge/ui/gtkui/menubar.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deluge/ui/gtkui/menubar.py b/deluge/ui/gtkui/menubar.py index dfdd7a0ba..32234bb28 100644 --- a/deluge/ui/gtkui/menubar.py +++ b/deluge/ui/gtkui/menubar.py @@ -213,10 +213,11 @@ class MenuBar(component.Component): # demon. self.menuitem_change_owner.set_visible(False) - # Get Known accounts to allow chaning ownership - client.core.get_known_accounts().addCallback( - self._on_known_accounts).addErrback(self._on_known_accounts_fail - ) + if client.get_auth_level() == deluge.common.AUTH_LEVEL_ADMIN: + # Get Known accounts to allow chaning ownership + client.core.get_known_accounts().addCallback( + self._on_known_accounts).addErrback(self._on_known_accounts_fail + ) def stop(self): log.debug("MenuBar stopping")