added per-collectivity identity store
This commit is contained in:
parent
41050daa0d
commit
999b5dd53e
|
@ -24,6 +24,7 @@ from qommon.storage import StorableObject
|
|||
|
||||
from authentic.root import LoginError, RegistrationError
|
||||
|
||||
import stores
|
||||
|
||||
def is_federated_with_msp(self):
|
||||
if not self.lasso_proxy_dump:
|
||||
|
@ -63,6 +64,7 @@ class AlternateRootDirectory(OldRootDirectory):
|
|||
liberty = AlternateLibertyDirectory()
|
||||
|
||||
def _q_traverse(self, path):
|
||||
stores.load_store()
|
||||
t = OldRootDirectory._q_traverse(self, path)
|
||||
federated_with_msp = ''
|
||||
if get_session() and get_session().user:
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
from quixote import get_session, get_session_manager, get_request, get_publisher
|
||||
|
||||
import authentic.identities
|
||||
|
||||
class VandoeuvreIdentity(authentic.identities.Identity):
|
||||
_names = 'identities-546555'
|
||||
|
||||
|
||||
def load_store():
|
||||
coll_id = get_request().get_header('X-Gdd-Account-Number')
|
||||
if coll_id == '546555': # Vandoeuvre
|
||||
store = authentic.identities.IdentitiesStoreStorage(identity_class = VandoeuvreIdentity)
|
||||
elif coll_id == '547263': # Parthenay
|
||||
raise NotImplementedError()
|
||||
else:
|
||||
store = authentic.identities.IdentitiesStoreStorage()
|
||||
get_publisher().store = store
|
Reference in New Issue