[RigoDaemon] _update_repositories(): make possible to bypass authorization

This commit is contained in:
Fabio Erculiani
2012-04-12 18:03:48 +02:00
parent 0ea3fbf0d8
commit dab7ea2702
+5 -3
View File
@@ -928,12 +928,14 @@ class RigoDaemonService(dbus.service.Object):
GLib.idle_add(self.updates_available,
update, remove)
def _update_repositories(self, repositories, force, activity, pid):
def _update_repositories(self, repositories, force, activity, pid,
authorized=False):
"""
Repositories Update execution code.
"""
authorized = self._authorize(
pid, PolicyActions.UPDATE_REPOSITORIES)
if not authorized:
authorized = self._authorize(
pid, PolicyActions.UPDATE_REPOSITORIES)
if not authorized:
write_output("_update_repositories: not authorized",
debug=True)