Fix session.save() for cookie sessions, add vcsserver/rc_license stubs
- Guard all session.save() calls with hasattr checks for CookieSession compatibility (CookieSession auto-saves via response callbacks) - Guard beaker-specific _set_cookie_expires and _update_cookie_out in login views - Defer ldap scope_labels to property to avoid class-level AttributeError when python-ldap is not installed - Add vcsserver stub package to allow imports without full vcsserver - Add rc_license stub for CE edition (no license management)
This commit is contained in:
parent
784a89fc9e
commit
dc3502fed0
10 changed files with 46 additions and 10 deletions
|
|
@ -19,11 +19,17 @@ except ImportError:
|
|||
class LdapDao(AuthLdapBase):
|
||||
default_tls_cert_dir = "/etc/openldap/cacerts"
|
||||
|
||||
scope_labels = {
|
||||
ldap.SCOPE_BASE: "SCOPE_BASE",
|
||||
ldap.SCOPE_ONELEVEL: "SCOPE_ONELEVEL",
|
||||
ldap.SCOPE_SUBTREE: "SCOPE_SUBTREE",
|
||||
}
|
||||
@staticmethod
|
||||
def _scope_labels():
|
||||
return {
|
||||
ldap.SCOPE_BASE: "SCOPE_BASE",
|
||||
ldap.SCOPE_ONELEVEL: "SCOPE_ONELEVEL",
|
||||
ldap.SCOPE_SUBTREE: "SCOPE_SUBTREE",
|
||||
}
|
||||
|
||||
@property
|
||||
def scope_labels(self):
|
||||
return self._scope_labels()
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue