From e6a3656ab71faea8669af50ceeaf4d9a91fe0142 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 6 May 2015 11:47:46 -0400 Subject: SSSD info plugin is immutable if not preconfigured The SSSD info plugin configures SSSD and modules in Apache as root during installation. This cannot be done in the UI so we must not allow users to modify the state if it was not "preconfigured" during install. If it has been configured then users are allowed to enable/disable the plugin. This is controlled by a value stored in the info_config table, preconfigured. The plugin configuration is hidden from the UI by overridding the get_config_object() method. https://fedorahosted.org/ipsilon/ticket/111 Signed-off-by: Simo Sorce Reviewed-by: Rob Crittenden --- ipsilon/info/common.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ipsilon/info/common.py') diff --git a/ipsilon/info/common.py b/ipsilon/info/common.py index a97d648..6907c72 100644 --- a/ipsilon/info/common.py +++ b/ipsilon/info/common.py @@ -65,7 +65,13 @@ class Info(Log): if item not in plugins.available: self.debug('Info Plugin %s not found' % item) continue - plugins.available[item].enable() + try: + plugins.available[item].enable() + except Exception as e: # pylint: disable=broad-except + while item in plugins.enabled: + plugins.enabled.remove(item) + self.debug("Info Plugin %s couldn't be enabled: %s" % ( + item, str(e))) def get_user_attrs(self, user, requested=None): plugins = self._site[FACILITY].available -- cgit