From 85e31dfa2cee02214922a53d323dda7363c717e3 Mon Sep 17 00:00:00 2001
From: Andrew Williams
Date: Thu, 18 Mar 2010 23:42:49 +0000
Subject: [PATCH 1/2] Fixed mediawiki password reset
---
sso/services/wiki/__init__.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sso/services/wiki/__init__.py b/sso/services/wiki/__init__.py
index 2a7a25b..77725b8 100644
--- a/sso/services/wiki/__init__.py
+++ b/sso/services/wiki/__init__.py
@@ -82,10 +82,11 @@ class MediawikiService(BaseService):
pwhash = self._gen_mw_hash(password)
self._dbcursor.execute(self.SQL_ENABLE_USER, [pwhash, uid])
self._db.connection.commit()
- pass
+ return True
def reset_password(self, uid, password):
""" Reset the user's password """
- self.enable_user(uid, password)
+ return self.enable_user(uid, password)
+
ServiceClass = 'MediawikiService'
From 5b4791fce5e3bb8da0b4b597c9be6eb7946662c5 Mon Sep 17 00:00:00 2001
From: Andrew Williams
Date: Fri, 19 Mar 2010 10:01:55 +0000
Subject: [PATCH 2/2] Updated templates to put emphasis that they're external
services
---
templates/sso/profile.html | 6 +++---
templates/sso/serviceaccount/created.html | 4 +++-
templates/sso/serviceaccount/index.html | 2 +-
templates/sso/serviceaccount/noneavailable.html | 2 +-
templates/sso/serviceaccount/reset.html | 2 +-
templates/sso/serviceaccount/resetcomplete.html | 5 ++---
6 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/templates/sso/profile.html b/templates/sso/profile.html
index 6a4e2a3..1cf5518 100644
--- a/templates/sso/profile.html
+++ b/templates/sso/profile.html
@@ -12,9 +12,9 @@
{% if eveaccounts %}
-Service Accounts
-This is a list of all your current service accounts, to create a login for
-a new service click the Add Service link
+External Service Accounts
+This is a list of all your current external service accounts, to
+create a login for a service click the Add Service link
{% if srvaccounts %}
diff --git a/templates/sso/serviceaccount/created.html b/templates/sso/serviceaccount/created.html
index f5c539e..a69c94b 100644
--- a/templates/sso/serviceaccount/created.html
+++ b/templates/sso/serviceaccount/created.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
-{% block title %}Service Account{% endblock %}
+{% block title %}External Service Account{% endblock %}
{% block content %}
{% if error %}
@@ -12,6 +12,8 @@ this is incorrect please raise a bug on the tracker.
Your account on {{ account.service }} has been created. Your login details are as follows:
+| Service: | {{ account.service.name }} |
+| Service URL: | {{ account.service.url }} |
| Username: | {{ account.service_uid }} |
| Password: | {{ account.password }} |
diff --git a/templates/sso/serviceaccount/index.html b/templates/sso/serviceaccount/index.html
index 783b601..a4cfbdc 100644
--- a/templates/sso/serviceaccount/index.html
+++ b/templates/sso/serviceaccount/index.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
-{% block title %}Add Service Account{% endblock %}
+{% block title %}Add External Service Account{% endblock %}
{% block content %}
To add a service to your account, selec the service from the list below
diff --git a/templates/sso/serviceaccount/noneavailable.html b/templates/sso/serviceaccount/noneavailable.html
index 544ac44..339d515 100644
--- a/templates/sso/serviceaccount/noneavailable.html
+++ b/templates/sso/serviceaccount/noneavailable.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
-{% block title %}Service Account{% endblock %}
+{% block title %}External Service Account{% endblock %}
{% block content %}
You have no services available to add to your account
diff --git a/templates/sso/serviceaccount/reset.html b/templates/sso/serviceaccount/reset.html
index 9920855..9aae69d 100644
--- a/templates/sso/serviceaccount/reset.html
+++ b/templates/sso/serviceaccount/reset.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
-{% block title %}Service Account Password Reset{% endblock %}
+{% block title %}External Service Account Password Reset{% endblock %}
{% block content %}
diff --git a/templates/sso/serviceaccount/resetcomplete.html b/templates/sso/serviceaccount/resetcomplete.html
index 21e1f25..f20f019 100644
--- a/templates/sso/serviceaccount/resetcomplete.html
+++ b/templates/sso/serviceaccount/resetcomplete.html
@@ -1,12 +1,11 @@
{% extends "base.html" %}
-{% block title %}Service Account{% endblock %}
+{% block title %}External Service Account{% endblock %}
{% block content %}
{% if error %}
-Error: Your account has not been created. Either you already have a user on this service or a error has occured. If you think
-this is incorrect please raise a bug on the tracker.
+Error: A error occured resetting your account. Please raise a issue with the Web Team
{% else %}
Your account on {{ acc.service }} has been reset. Your login details are as follows: