Author: adc
Date: Mon Sep 23 15:06:36 2013
New Revision: 1525617
URL: http://svn.apache.org/r1525617
Log:
Identity id or name? This weekend it seems to be id.
Modified:
labs/panopticon/src/asf/panopticon/__init__.py
labs/panopticon/src/asf/panopticon/templates/layout.html
Modified: labs/panopticon/src/asf/panopticon/__init__.py
URL:
http://svn.apache.org/viewvc/labs/panopticon/src/asf/panopticon/__init__.py?rev=1525617&r1=1525616&r2=1525617&view=diff
==============================================================================
--- labs/panopticon/src/asf/panopticon/__init__.py (original)
+++ labs/panopticon/src/asf/panopticon/__init__.py Mon Sep 23 15:06:36 2013
@@ -95,8 +95,8 @@ login_required = is_authenticated.requir
# workaround some bugs with the default session identities
def session_identity_loader():
- if 'identity.name' in session and 'identity.auth_type' in session:
- identity = Identity(session['identity.name'],
+ if 'identity.id' in session and 'identity.auth_type' in session:
+ identity = Identity(session['identity.id'],
session['identity.auth_type'])
return identity
else:
@@ -105,10 +105,10 @@ def session_identity_loader():
def session_identity_saver(identity):
if identity is None or not identity.is_authenticated:
- session.pop('identity.name', None)
+ session.pop('identity.id', None)
session.pop('identity.auth_type', None)
else:
- session['identity.name'] = identity.name
+ session['identity.id'] = identity.id
session['identity.auth_type'] = identity.auth_type
session.modified = True
@@ -125,7 +125,7 @@ def on_identity_loaded(sender, identity)
identity.is_authenticated = not isinstance(identity,
principal.AnonymousIdentity)
if identity.is_authenticated:
- person = Person(identity.name)
+ person = Person(identity.id)
identity.person = person
identity.provides.add(principal.RoleNeed('authenticated'))
else:
Modified: labs/panopticon/src/asf/panopticon/templates/layout.html
URL:
http://svn.apache.org/viewvc/labs/panopticon/src/asf/panopticon/templates/layout.html?rev=1525617&r1=1525616&r2=1525617&view=diff
==============================================================================
--- labs/panopticon/src/asf/panopticon/templates/layout.html (original)
+++ labs/panopticon/src/asf/panopticon/templates/layout.html Mon Sep 23
15:06:36 2013
@@ -75,8 +75,8 @@
<p class="navbar-text pull-right">
Logged in as
<a href="#" rel="user"
- data-username="{{ g.identity.name }}"
- >{{ g.identity.name }}</a> |
+ data-username="{{ g.identity.id }}"
+ >{{ g.identity.id }}</a> |
<a href="{{ url_for('logout') }}">Sign out</a>
</p>
{% elif g.login_allowed%}
@@ -107,7 +107,7 @@
<div id="footer">
<div class="container">
<p class="text-muted credit">
- Copyright © 2013 <a href="http://apache.irg">Apache Software
Foundation</a>, Licensed under the <a
href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
+ Copyright © 2013 <a href="http://apache.org">Apache Software
Foundation</a>, Licensed under the <a
href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
<br/>
Apache and the Apache feather logo are trademarks of The Apache
Software Foundation.
</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]