From: Jordan Augé Date: Thu, 6 Mar 2014 14:58:26 +0000 (+0100) Subject: Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab X-Git-Tag: myslice-1.1~219^2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a5361a5bcf8457eea5f25fed266db99a5fa7ac88;hp=97ca46051fe80b3cbd6978d558901c675d787d76;p=unfold.git Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab --- diff --git a/portal/registrationview.py b/portal/registrationview.py index 8fd5917b..f79b1b5d 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -41,14 +41,7 @@ class RegistrationView (FreeAccessView, ThemeView): authorities = execute_admin_query(wsgi_request, authorities_query) if authorities is not None: authorities = sorted(authorities) - - # xxx tocheck - if authorities is empty, it's no use anyway - # (users won't be able to validate the form anyway) - - # Who am I ? - user_query = Query().get('local:user').select('user_id','email') - user_details = execute_admin_query(wsgi_request, user_query) - + # Page rendering page = Page(wsgi_request) page.add_js_files ( [ "js/jquery.validate.js", "js/my_account.register.js" ] ) @@ -83,9 +76,18 @@ class RegistrationView (FreeAccessView, ThemeView): errors.append('Email is pending for validation. Please provide a new email address.') if UserModel._default_manager.filter(email__iexact = user_request['email']): errors.append('This email is not usable. Please contact the administrator or try with another email.') + # Does the user exist in Manifold? + user_query = Query().get('local:user').select('user_id','email') + user_details = execute_admin_query(wsgi_request, user_query) for user_detail in user_details: if user_detail['email'] == user_request['email']: errors.append('Email already registered in Manifold. Please provide a new email address.') + # Does the user exist in sfa? [query is very slow!!] + user_query = Query().get('user').select('user_hrn','user_email') + user_details_sfa = execute_admin_query(wsgi_request, user_query) + for user in user_details_sfa: + if user['user_email'] == user_request['email']: + errors.append('Email already registered in SFA registry. Please use another email.') # XXX TODO: Factorize with portal/accountview.py if 'generate' in wsgi_request.POST['question']: diff --git a/portal/templates/contact.html b/portal/templates/contact.html index 56609126..fe327a68 100644 --- a/portal/templates/contact.html +++ b/portal/templates/contact.html @@ -9,9 +9,10 @@

Open a Ticket OneLab Support

+

Please check our FAQ section. Most of the basic problems are explained there.

- If you have any diffculties using the portal, please contact us by filling this form below.
- You can also e-mail us directly or consult to our documentation + If you haven't find your answes in the FAQ, please contact us by filling the form below.
+ You can also e-mail us directly.

diff --git a/portal/templates/documentationview.html b/portal/templates/documentationview.html index 5c838d0a..00a07f9c 100644 --- a/portal/templates/documentationview.html +++ b/portal/templates/documentationview.html @@ -28,7 +28,26 @@ Manifold is the backend that is running behind the portal.

More Info: SFA Registry

FAQ

Users

+
Who is a User?
+

A user is an experimenter who registers to the onelab portal and able to use all the facilites that the portal has to offer. However, a user does not +have the right to do any admin operation such as managing slices, users and resources.

+
How do I register?
+
Why can't I register with my email?
+
Who is responsible for validating my account?
+
How long I have to wait for validation?
+
I just registered. Why can't I see any slices and resources?
+
How can I get access to a slice?
+
I forgot my password, how to recover it?
+

Managers

+
Who is a Manager?
+

A manager is the Principal Investigator (PI) of the institution. Each PI has authority over his own institution. A PI can add, delete, validate users or +slices that belongs to his institution.

+
What is pending users/slices?
+
How to see the pending users/slices of my instituion?
+
How to validate/reject pending users/slices?
+
Can I see the pending users/slices of other institutions?
+
How can I manage the users that belong to my institution?
{% endblock %} diff --git a/portal/templates/onelab/onelab_home-view.html b/portal/templates/onelab/onelab_home-view.html index 4915b9e2..f3090b22 100644 --- a/portal/templates/onelab/onelab_home-view.html +++ b/portal/templates/onelab/onelab_home-view.html @@ -35,7 +35,7 @@ {% if person %} - +
Loading Slices
{% else %} {% endif %} @@ -73,7 +73,7 @@ {% if person %} - + {% endif %} diff --git a/portal/templates/password_reset_confirm.html b/portal/templates/password_reset_confirm.html index 8f9d2f77..5701ab1e 100644 --- a/portal/templates/password_reset_confirm.html +++ b/portal/templates/password_reset_confirm.html @@ -1,6 +1,6 @@ {% extends "layout.html" %} {% block content %} - +{% load i18n %} {% if validlink %}