def manage_addShibbolethPermissions(self, pluginId, title='', REQUEST=None):
    """Add giving permissions to a Shibboleth user."""

    handler = ShibbolethPermissionsHandler(pluginId, title)
    self._setObject(handler.getId(), handler)

    if REQUEST is not None:
        REQUEST['RESPONSE'].redirect('%s/manage_workspace'
                                     '?manage_tabs_message='
                                     'ShibbolethPermissions+added.'
                                     % self.absolute_url())
Esempio n. 2
0
def manage_addShibbolethPermissions(self, pluginId, title='', REQUEST=None):
    """Add giving permissions to a Shibboleth user."""

    handler = ShibbolethPermissionsHandler(pluginId, title)
    self._setObject(handler.getId(), handler)

    if REQUEST is not None:
        REQUEST['RESPONSE'].redirect('%s/manage_workspace'
                                     '?manage_tabs_message='
                                     'ShibbolethPermissions+added.' %
                                     self.absolute_url())
 def test_getlocalroles(self):
     sph = ShibbolethPermissionsHandler('test')
     self.assertEqual(sph.getLocalRoles(), {})
 def test_listkeys(self):
     sph = ShibbolethPermissionsHandler('test')
     self.assertEqual(sph.listKeys({'b': 2, 'a': 1, 'c': 3}), ['a', 'b', 'c'])