GTK UI menubar accounts retrieval.

Only ask for known accounts if we have the required level for it.
This commit is contained in:
Pedro Algarvio 2011-05-08 21:36:10 +01:00
parent ffd344d0b5
commit 3b8ebf68a6
1 changed files with 5 additions and 4 deletions

View File

@ -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")