Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

New django app started to handle all User creation scenarios.

  • Loading branch information...
commit 477d3624f6a6be6ca07d13dd241fa216b09d0494 1 parent 28f8e12
Alex Clemesha clemesha-ooi authored
1  web/src/python/nimbusweb/portal/settings.py
View
@@ -65,6 +65,7 @@
'django.contrib.sites',
#'cpserver',
'nimbusweb.portal.nimbus',
+ 'nimbusweb.portal.usercreate',
)
AUTH_PROFILE_MODULE = 'nimbus.UserProfile'
28 web/src/python/nimbusweb/portal/static/base.css
View
@@ -211,4 +211,30 @@ div.lrow span.finput {
float: right;
width: 250px;
text-align: left;
-}
+}
+
+ul#createmethods {
+ text-align:center;
+}
+ul#createmethods li {
+ list-style:none;
+ margin:25px 200px;
+ padding:4px 0px;
+ background-color:#f5f5f5;
+ -webkit-border-radius:4px;
+ -moz-border-radius:4px;
+ -moz-box-shadow:0 0 6px #888;
+ -webkit-box-shadow:0 0 8px #888;
+
+}
+ul#createmethods p {
+ margin:2px;
+}
+p.method {
+ color:#000;
+ font-size:125%;
+}
+p.details {
+ color:#8f8f8f;
+ font-size:75%;
+}
3  web/src/python/nimbusweb/portal/templates/base.html
View
@@ -17,6 +17,7 @@
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="/static/ie6.0.3.css" media="screen, projection" />
<![endif]-->
+ {% block extrahead %}{% endblock %}
</head>
<body id="home">
@@ -46,7 +47,7 @@
</footer>
<!-- JS link will go here -->
-
+ {% block extrafooter %}{% endblock %}
</body>
</html>
12 web/src/python/nimbusweb/portal/templates/usercreate/index.html
View
@@ -0,0 +1,12 @@
+
+{% extends "base.html" %}
+{% block content %}
+ <h1>Create a new User.</h1>
+ <h3>Please choose one of the following methods:</h3>
+ <ul id="createmethods">
+ {% for path, method, details in createmethods %}
+ <li><a href="{{ path }}"><p class="method">{{ method }}</p><p class="details">{{ details }}</p></a></li>
+ {% endfor %}
+ </ul>
+
+{% endblock %}
1  web/src/python/nimbusweb/portal/urls.py
View
@@ -11,6 +11,7 @@
(r'^$', "nimbusweb.portal.welcome.views.index"),
(r'^admin/', include(admin.site.urls)),
(r'^nimbus/', include("nimbusweb.portal.nimbus.urls")),
+ (r'^usercreate/', include("nimbusweb.portal.usercreate.urls")),
)
_media_url = settings.MEDIA_URL
19 web/src/python/nimbusweb/portal/usercreate/README
View
@@ -0,0 +1,19 @@
+Django app soley for handling Nimbus/Django User creation scenarios.
+====================================================================
+
+User Create Scenarios:
+----------------------
+ 1. "Provide User's Cert and Key files".
+ - details: Upload them, extract DN for cert, do nimbus rest call to create user.
+
+ 2. "Provide User's DN"
+ - details: "The User has a trusted certificate, I have the User's DN"
+
+ 3. "Auto-create a new certificate"
+ - details: "The embedded CA will be used to create a new certificate"
+
+
+
+Success of any of the 3 steps should end in a unique url,
+to be emailed to the User, so they can log in a verify/add
+the rest of the needed info.
0  web/src/python/nimbusweb/portal/usercreate/__init__.py
View
No changes.
2  web/src/python/nimbusweb/portal/usercreate/forms.py
View
@@ -0,0 +1,2 @@
+from django import forms
+
6 web/src/python/nimbusweb/portal/usercreate/urls.py
View
@@ -0,0 +1,6 @@
+from django.conf.urls.defaults import *
+from django.contrib.auth.views import login, logout, password_change, password_change_done
+
+urlpatterns = patterns('nimbusweb.portal.usercreate.views',
+ (r'^$', 'index'),
+)
13 web/src/python/nimbusweb/portal/usercreate/views.py
View
@@ -0,0 +1,13 @@
+from django.shortcuts import render_to_response
+from django.contrib.auth.decorators import login_required, user_passes_test
+from django.http import HttpResponse, HttpResponseRedirect
+from django.core.urlresolvers import reverse
+
+USER_CREATE_METHODS = (
+ ("certkey", "Provide User's Cert and Key files", "The DN will be extracted from upload keys to create a new User."),
+ ("dn", "Provide User's DN", "The provided DN will be used to create a new User."),
+ ("autocreate", "Auto-create a Certificate and User", "A new certicate will be created, then used to create a new User.")
+)
+
+def index(request):
+ return render_to_response('usercreate/index.html', {"createmethods":USER_CREATE_METHODS})
Please sign in to comment.
Something went wrong with that request. Please try again.