if 'delete_'+platform_detail['platform'] in request.POST:
platform_id = platform_detail['platform_id']
user_params = {'user_id':user_id}
- manifold_delete_account(request,platform_id,user_params)
+ manifold_delete_account(request,platform_id, user_id, user_params)
messages.info(request, 'Reference Account is removed from the selected platform')
return HttpResponseRedirect("/portal/account/")
updated_config = json.dumps(account_config)
# updating manifold
user_params = { 'config': keypair, 'auth_type':'managed'}
- manifold_update_account(request,user_params)
+ manifold_update_account(request, user_id, user_params)
# updating sfa
public_key = public_key.replace('"', '');
user_pub_key = {'keys': public_key}
file_content = ''.join(file_content.split())
#update manifold local:account table
user_params = { 'config': file_content, 'auth_type':'user'}
- manifold_update_account(request,user_params)
+ manifold_update_account(request, user_id, user_params)
# updating sfa
user_pub_key = {'keys': file_content}
sfa_update_user(request, user_hrn, user_pub_key)
updated_config = json.dumps(account_config)
user_params = { 'config': updated_config, 'auth_type':'user'}
- manifold_update_account(request,user_params)
+ manifold_update_account(request, user_id, user_params)
messages.success(request, 'Private Key deleted. You need to delegate credentials manually once it expires.')
messages.success(request, 'Once your credentials expire, Please delegate manually using SFA: http://trac.myslice.info/wiki/DelegatingCredentials')
return HttpResponseRedirect("/portal/account/")
user_priv_key = json.dumps(account_config.get('user_private_key','N/A'))
updated_config = '{"user_public_key":'+ user_pub_key + ', "user_private_key":'+ user_priv_key + ', "user_hrn":"'+ user_hrn + '"}'
user_params = { 'config': updated_config}
- manifold_update_account(request,user_params)
+ manifold_update_account(request,user_id, user_params)
messages.success(request, 'All Credentials cleared')
return HttpResponseRedirect("/portal/account/")
else:
result, = results
return result['user_id']
-def manifold_update_account(request,account_params):
+def manifold_update_account(request,user_id,account_params):
# account_params: config
- query = Query.update('local:account').filter_by('platform', '==', 'myslice').set(account_params).select('user_id')
- results = execute_query(request,query)
- # NOTE: results remains empty and goes to Exception. However, it updates the manifold DB.
- # That's why I commented the exception part. -- Yasin
- #if not results:
- # raise Exception, "Failed updating manifold account: config %s" % account_params['config']
- #result, = results
+ query = Query.update('local:account').filter_by('platform', '==', 'myslice').filter_by('user_id', '==', user_id).set(account_params).select('user_id')
+ results = execute_admin_query(request,query)
return results
#explicitly mention the platform_id
-def manifold_delete_account(request, platform_id, account_params):
- query = Query.delete('local:account').filter_by('platform_id', '==', platform_id).set(account_params).select('user_id')
- results = execute_query(request,query)
+def manifold_delete_account(request, platform_id, user_id, account_params):
+ query = Query.delete('local:account').filter_by('platform_id', '==', platform_id).filter_by('user_id', '==', user_id).set(account_params).select('user_id')
+ results = execute_admin_query(request,query)
return results
for user_detail in user_details:
user_id = user_detail['user_id']
user_email = user_detail['email']
- print "hello_world"
- print user_id
# different significations of user_status
if user_detail['status'] == 0:
user_status = 'Disabled'
@login_required
#my_acc form value processing
-def user_process(request):
- user_query = Query().get('local:user').select('user_id','email','password','config')
- user_details = execute_query(request, user_query)
-
- account_query = Query().get('local:account').select('user_id','platform_id','auth_type','config')
- account_details = execute_query(request, account_query)
+def user_process(request, **kwargs):
+
+ for key, value in kwargs.iteritems():
+ if key == "email":
+ selected_email=value
- platform_query = Query().get('local:platform').select('platform_id','platform')
- platform_details = execute_query(request, platform_query)
+ redirect_url = "/portal/user/"+selected_email
+ user_query = Query().get('local:user').filter_by('email', '==', selected_email).select('user_id','email','password','config')
+ user_details = execute_admin_query(request, user_query)
+
# getting the user_id from the session
for user_detail in user_details:
- user_id = user_detail['user_id']
+ user_id = user_detail['user_id']
+ user_email = user_detail['email']
+
+ account_query = Query().get('local:account').filter_by('user_id', '==', user_id).select('user_id','platform_id','auth_type','config')
+ account_details = execute_admin_query(request, account_query)
+
+ platform_query = Query().get('local:platform').select('platform_id','platform')
+ platform_details = execute_admin_query(request, platform_query)
+
for account_detail in account_details:
for platform_detail in platform_details:
if 'add_'+platform_detail['platform'] in request.POST:
platform_id = platform_detail['platform_id']
user_params = {'platform_id': platform_id, 'user_id': user_id, 'auth_type': "reference", 'config': '{"reference_platform": "myslice"}'}
- manifold_add_account(request,user_params)
+ manifold_add_account(request, user_params)
messages.info(request, 'Reference Account is added to the selected platform successfully!')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
# Delete reference account from the platforms
if 'delete_'+platform_detail['platform'] in request.POST:
platform_id = platform_detail['platform_id']
user_params = {'user_id':user_id}
- manifold_delete_account(request,platform_id,user_params)
- messages.info(request, 'Reference Account is removed from the selected platform')
- return HttpResponseRedirect("/portal/account/")
+ manifold_delete_account(request, platform_id, user_id, user_params)
+ messages.info(request, 'Refeence Account is removed from the selected platform')
+ return HttpResponseRedirect(redirect_url)
if platform_detail['platform_id'] == account_detail['platform_id']:
if 'myslice' in platform_detail['platform']:
user_config['config']= '{"firstname":"' + edited_first_name + '", "lastname":"'+ edited_last_name + '", "authority": "Unknown Authority"}'
user_params = {'config': user_config['config']}
# updating config local:user in manifold
- manifold_update_user(request, request.user.email,user_params)
+ manifold_update_user(request, user_email, user_params)
# this will be depricated, we will show the success msg in same page
# Redirect to same page with success message
messages.success(request, 'Sucess: First Name and Last Name Updated.')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
- elif 'submit_pass' in request.POST:
- edited_password = request.POST['password']
+ elif 'submit_auth' in request.POST:
+ edited_auth = request.POST['authority']
- for user_pass in user_details:
- user_pass['password'] = edited_password
- #updating password in local:user
- user_params = { 'password': user_pass['password']}
- manifold_update_user(request,request.user.email,user_params)
-# return HttpResponse('Success: Password Changed!!')
- messages.success(request, 'Sucess: Password Updated.')
- return HttpResponseRedirect("/portal/account/")
+ config={}
+ for user_config in user_details:
+ if user_config['config']:
+ config = json.loads(user_config['config'])
+ config['firstname'] = config.get('firstname', 'N/A')
+ config['lastname'] = config.get('lastname','N/A')
+ config['authority'] = edited_auth
+ updated_config = json.dumps(config)
+ user_params = {'config': updated_config}
+ else: # it's needed if the config is empty
+ user_config['config']= '{"firstname": "N/A", "lastname":"N/A", "authority":"' + edited_auth + '"}'
+ user_params = {'config': user_config['config']}
+ # updating config local:user in manifold
+ manifold_update_user(request, user_email, user_params)
+ # this will be depricated, we will show the success msg in same page
+ # Redirect to same page with success message
+ messages.success(request, 'Sucess: Authority Updated.')
+ return HttpResponseRedirect(redirect_url)
# XXX TODO: Factorize with portal/registrationview.py
updated_config = json.dumps(account_config)
# updating manifold
user_params = { 'config': keypair, 'auth_type':'managed'}
- manifold_update_account(request,user_params)
+ manifold_update_account(request, user_id, user_params)
# updating sfa
- public_key = public_key.replace('"', '');
- user_pub_key = {'keys': public_key}
- sfa_update_user(request, user_hrn, user_pub_key)
+ #public_key = public_key.replace('"', '');
+ #user_pub_key = {'keys': public_key}
+ #sfa_update_user(request, user_hrn, user_pub_key)
messages.success(request, 'Sucess: New Keypair Generated! Delegation of your credentials will be automatic.')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
else:
messages.error(request, 'Account error: You need an account in myslice platform to perform this action')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
elif 'upload_key' in request.POST:
for account_detail in account_details:
file_content = ''.join(file_content.split())
#update manifold local:account table
user_params = { 'config': file_content, 'auth_type':'user'}
- manifold_update_account(request,user_params)
+ manifold_update_account(request,user_id,user_params)
# updating sfa
- user_pub_key = {'keys': file_content}
- sfa_update_user(request, user_hrn, user_pub_key)
+ #user_pub_key = {'keys': file_content}
+ #sfa_update_user(request, user_hrn, user_pub_key)
messages.success(request, 'Publickey uploaded! Please delegate your credentials using SFA: http://trac.myslice.info/wiki/DelegatingCredentials')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
else:
messages.error(request, 'RSA key error: Please upload a valid RSA public key [.txt or .pub].')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
else:
messages.error(request, 'Account error: You need an account in myslice platform to perform this action')
return HttpResponseRedirect("/portal/account/")
break
else:
messages.error(request, 'Account error: You need an account in myslice platform to perform this action')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
elif 'dl_pkey' in request.POST:
for account_detail in account_details:
return response
else:
messages.error(request, 'Download error: Private key is not stored in the server')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
else:
messages.error(request, 'Account error: You need an account in myslice platform to perform this action')
return HttpResponseRedirect("/portal/account/")
- elif 'delete' in request.POST:
- for account_detail in account_details:
- for platform_detail in platform_details:
- if platform_detail['platform_id'] == account_detail['platform_id']:
- if 'myslice' in platform_detail['platform']:
- account_config = json.loads(account_detail['config'])
- if 'user_private_key' in account_config:
- for key in account_config.keys():
- if key == 'user_private_key':
- del account_config[key]
-
- updated_config = json.dumps(account_config)
- user_params = { 'config': updated_config, 'auth_type':'user'}
- manifold_update_account(request,user_params)
- messages.success(request, 'Private Key deleted. You need to delegate credentials manually once it expires.')
- messages.success(request, 'Once your credentials expire, Please delegate manually using SFA: http://trac.myslice.info/wiki/DelegatingCredentials')
- return HttpResponseRedirect("/portal/account/")
- else:
- messages.error(request, 'Delete error: Private key is not stored in the server')
- return HttpResponseRedirect("/portal/account/")
-
- else:
- messages.error(request, 'Account error: You need an account in myslice platform to perform this action')
- return HttpResponseRedirect("/portal/account/")
+# elif 'delete' in request.POST:
+# for account_detail in account_details:
+# for platform_detail in platform_details:
+# if platform_detail['platform_id'] == account_detail['platform_id']:
+# if 'myslice' in platform_detail['platform']:
+# account_config = json.loads(account_detail['config'])
+# if 'user_private_key' in account_config:
+# for key in account_config.keys():
+# if key == 'user_private_key':
+# del account_config[key]
+#
+# updated_config = json.dumps(account_config)
+# user_params = { 'config': updated_config, 'auth_type':'user'}
+# manifold_update_account(request,user_params)
+# messages.success(request, 'Private Key deleted. You need to delegate credentials manually once it expires.')
+# messages.success(request, 'Once your credentials expire, Please delegate manually using SFA: http://trac.myslice.info/wiki/DelegatingCredentials')
+# return HttpResponseRedirect("/portal/account/")
+# else:
+# messages.error(request, 'Delete error: Private key is not stored in the server')
+# return HttpResponseRedirect(redirect_url)
+#
+# else:
+# messages.error(request, 'Account error: You need an account in myslice platform to perform this action')
+# return HttpResponseRedirect(redirect_url)
#clear all creds
elif 'clear_cred' in request.POST:
user_priv_key = json.dumps(account_config.get('user_private_key','N/A'))
updated_config = '{"user_public_key":'+ user_pub_key + ', "user_private_key":'+ user_priv_key + ', "user_hrn":"'+ user_hrn + '"}'
user_params = { 'config': updated_config}
- manifold_update_account(request,user_params)
+ manifold_update_account(request, user_id,user_params)
messages.success(request, 'All Credentials cleared')
return HttpResponseRedirect("/portal/account/")
else:
messages.error(request, 'Delete error: Credentials are not stored in the server')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
else:
messages.error(request, 'Account error: You need an account in myslice platform to perform this action')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
# Download delegated_user_cred
return response
else:
messages.error(request, 'Download error: User credential is not stored in the server')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
else:
messages.info(request, 'Under Construction. Please try again later!')
- return HttpResponseRedirect("/portal/account/")
+ return HttpResponseRedirect(redirect_url)
from portal.forms import SliceRequestForm
from unfold.loginrequired import LoginRequiredAutoLogoutView
from ui.topmenu import topmenu_items_live, the_user
-from theme import ThemeView
+
+import json
+
class SliceRequestView (LoginRequiredAutoLogoutView, ThemeView):
def __init__ (self):
self.user_email = ''
user_email = execute_query(self.request, user_query)
self.user_email = user_email[0].get('email')
- user_query = Query().get('user').select('user_hrn').filter_by('user_hrn','==','$user_hrn')
- user_hrn = execute_query(self.request, user_query)
- self.user_hrn = user_hrn[0].get('user_hrn')
+ account_query = Query().get('local:account').select('user_id','platform_id','auth_type','config')
+ account_details = execute_query(self.request, account_query)
+
+ platform_query = Query().get('local:platform').select('platform_id','platform','gateway_type','disabled')
+ platform_details = execute_query(self.request, platform_query)
+
+ # getting user_hrn from local:account
+ for account_detail in account_details:
+ for platform_detail in platform_details:
+ if platform_detail['platform_id'] == account_detail['platform_id']:
+ # taking user_hrn only from myslice account
+ # NOTE: we should later handle accounts filter_by auth_type= managed OR user
+ if 'myslice' in platform_detail['platform']:
+ account_config = json.loads(account_detail['config'])
+ user_hrn = account_config.get('user_hrn','N/A')
+
+
+ #user_query = Query().get('user').select('user_hrn').filter_by('user_hrn','==','$user_hrn')
+ #user_hrn = execute_query(self.request, user_query)
+ #self.user_hrn = user_hrn[0].get('user_hrn')
+
+
page = Page(request)
page.add_css_files ( [ "http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" ] )
number_of_nodes = request.POST.get('number_of_nodes', '')
purpose = request.POST.get('purpose', '')
email = self.user_email
- user_hrn = self.user_hrn
+ user_hrn = user_hrn
cc_myself = True
if (authority_hrn is None or authority_hrn == ''):
'number_of_nodes': request.POST.get('number_of_nodes', ''),
'purpose': request.POST.get('purpose', ''),
'email': self.user_email,
- 'user_hrn': self.user_hrn,
+ 'user_hrn': user_hrn,
'cc_myself': True,
'authorities': authorities,
'theme': self.theme
}
template_env.update(page.prelude_env ())
return render(request, 'slicerequest_view.html',template_env)
-
jQuery("#span_pass").hide();
jQuery("#edit_pass").show();
jQuery("#passval").show();
- jQuery("#span_aff").hide();
- jQuery("#edit_aff").show();
- jQuery("#affval").show();
+ jQuery("#span_auth").hide();
+ jQuery("#edit_auth").show();
+ jQuery("#authval").show();
jQuery("#span_email").hide();
jQuery("#edit_email").show();
jQuery("#emailval").show();
jQuery("#span_name").hide();
jQuery("#edit_name").show();
jQuery("#nameval").show();
- jQuery("#span_aff").hide();
- jQuery("#edit_aff").show();
- jQuery("#affval").show();
+ jQuery("#span_auth").hide();
+ jQuery("#edit_aauth").show();
+ jQuery("#authval").show();
jQuery("#span_email").hide();
jQuery("#edit_email").show();
jQuery("#emailval").show();
}
}
});
- //edit affiliation
- jQuery("#edit_aff").click(function(){
+ //edit authority
+ jQuery("#edit_auth").click(function(){
- jQuery("#span_aff").show();
- jQuery("#affval").hide();
- jQuery("#edit_aff").hide();
+ jQuery("#span_auth").show();
+ jQuery("#authval").hide();
+ jQuery("#edit_auth").hide();
// enforcing when one edit is clicked the rest will not work at same time
jQuery("#span_pass").hide();
jQuery("#edit_pass").show();
jQuery("#dl_file").show();
jQuery("#upload_file").show();
});
- jQuery("#cancel_aff_change").click(function(){
+ jQuery("#cancel_auth_change").click(function(){
- jQuery("#span_aff").hide();
- jQuery("#affval").show();
- jQuery("#edit_aff").show();
+ jQuery("#span_auth").hide();
+ jQuery("#authval").show();
+ jQuery("#edit_auth").show();
});
//edit email
- /* edit email will be done by PI if needed
+ //edit email will be done by PI if needed
jQuery("#edit_email").click(function(){
jQuery("#span_email").show();
jQuery("#span_pass").hide();
jQuery("#edit_pass").show();
jQuery("#passval").show();
- jQuery("#span_aff").hide();
- jQuery("#edit_aff").show();
- jQuery("#affval").show();
+ jQuery("#span_auth").hide();
+ jQuery("#edit_auth").show();
+ jQuery("#authval").show();
jQuery("#span_name").hide();
jQuery("#edit_name").show();
jQuery("#nameval").show();
jQuery("#span_email").hide();
jQuery("#emailval").show();
jQuery("#edit_email").show();
- }); */
+ });
//upload pub keys
jQuery("#upload_file").click(function(){
jQuery("#span_pass").hide();
jQuery("#edit_pass").show();
jQuery("#passval").show();
- jQuery("#span_aff").hide();
- jQuery("#edit_aff").show();
- jQuery("#affval").show();
+ jQuery("#span_auth").hide();
+ jQuery("#edit_auth").show();
+ jQuery("#authval").show();
jQuery("#span_email").hide();
jQuery("#edit_email").show();
jQuery("#emailval").show();
{% endif %}
-<form id="editForm" method="POST" action="account_process" enctype="multipart/form-data">
+<form id="editForm" method="POST" action="{{user_email}}/user_process" enctype="multipart/form-data">
<div id="middle" align="center">
<div class="well">
{% csrf_token %}
<div id="info">Platform: Myslice</div>
</td>
</tr>
- <tr class="even">
- <td class="key">Email</td>
- <td class="value">
- <span id="emailval" class="value" >{{ user_email }}</span>
- <button class="btn btn-default btn-xs" type="button" id="edit_email" title="To change your affiliation please contact the administrator">
- <span class="glyphicon glyphicon-edit"></span> Edit
- </button>
- </td>
- </tr>
- <tr class="even">
+ <tr class="even">
+ <td class="key">Email</td>
+ <td class="value"> <span id="emailval" class="value" >{{ user_email }}</span> </td>
+ </tr>
+ <tr class="odd">
<td class="key">Full Name</td>
<td class="value">
<span id="nameval" class="value" >{{ fullname }} </span>
</button>
</td>
</tr>
- <tr class="odd">
- <td class="key">Authority</td>
- <td class="value">
- <span id="affval" class="value">{{ authority }}</span>
- <button class="btn btn-default btn-xs" type="button" id="edit_auth" title="To change your authority please contact the administrator">
- <span class="glyphicon glyphicon-edit"></span> Edit
- </button>
- </td>
- </tr>
<tr class="even">
+ <td class="key">Authority</td>
+ <td class="value">
+ <span id="authval" class="value" >{{ authority }} </span>
+ <span class="hide_this" id="span_auth">
+ <button type="button" class="btn btn-default btn-xs" title="Cancel" id="cancel_auth_change"> Cancel </button>
+ <div style='display:none;'><input type='hidden' name='authform' /></div>
+ <input id="authority" type="text" name="authority" class="required" maxlength="200" value="{{authority}}" />
+ <input type="submit" class="btn btn-default btn-xs" name="submit_auth" value="Save"/>
+ </span>
+ <button class="btn btn-default btn-xs" type="button"title="auth" id="edit_auth">
+ <span class="glyphicon glyphicon-edit"></span> Edit
+ </button>
+ </td>
+ </tr>
+ <tr class="odd">
<td class="key">Generate Keys</td>
<td>
<input type="submit" name="generate" class="btn btn-danger btn-xs" value="Generate a new Key Pair" id="generate_keypair"
title="It will generate a new key Pair and your current credentials will be overwritten."/>
</td>
</tr>
- <tr class="odd">
+ <tr class="even">
<td class="key">Public Key</td>
<td class="value">
<span id="keyval" class="value">******** </span>
</button>
</td>
</tr>
- <tr class="even" id="pkey_row">
- {%if 'N/A' not in user_private_key%}
- <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
- <td class="value">********<a href="#">
- <button type="submit" name="dl_pkey" class="btn btn-default btn-xs" title="Download your privaye key" id="dl_pkey">
- <span class="glyphicon glyphicon-download"></span> Download
- </button>
- <input class="btn btn-danger btn-xs" id="delete" name="delete" type="submit" value="Delete" title="Delete your private key"
- onclick="return confirm('Are you sure? If you do so, you have to delegate your credentials manually.');"/>
- </td>
- {%else%}
- <td class="key">Private Key </td> <!-- Hide if priv_key doesn't exist in myslice platform -->
- <td class="value">********<a href="#">
- <button type="submit" name="dl_pkey" class="btn btn-default btn-xs disabled" title="Download your privaye key" id="dl_pkey">
- <span class="glyphicon glyphicon-download"></span> Download
- </button>
- <input class="btn btn-danger btn-xs disabled" id="delete" name="delete" type="submit" title="Delete your private key"
- value="Delete" />
- </td>
- {%endif%}
- </tr>
</table>
</div>
</div>
from django.views.generic.base import TemplateView
from django.conf.urls import patterns, include, url
-from portal.adminview import AdminView
+from portal.usersview import UsersView
+from portal.manageuserview import UserView, user_process
from portal.platformsview import PlatformsView
from portal.platformview import PlatformView
from portal.resourceview import ResourceView
from portal.dashboardview import DashboardView
from portal.accountview import AccountView, account_process
-from portal.manageuserview import UserView, user_process
from portal.contactview import ContactView
from portal.slicerequestview import SliceRequestView
from portal.registrationview import RegistrationView
url(r'^dashboard/?$', DashboardView.as_view(), name='dashboard'),
#url(r'^my_account/?$', MyAccountView.as_view(), name='my_account'),
url(r'^account/?$', AccountView.as_view(), name='account'),
- url(r'^admin/?$', AdminView.as_view(), name='user_list'),
- url(r'^user/(?P<email>[\w\s.@\-]+)/?$', UserView.as_view(), name='account'),
- url(r'^user/user_process/?$', user_process),
+ url(r'^users/?$', UsersView.as_view(), name='user_list'),
+ url(r'^user/(?P<email>[\w\s.@\-]+)/?$', UserView.as_view(), name='user'),
+ url(r'^user/(?P<email>[\w\s.@\-]+)/user_process/?$', user_process),
url(r'^platforms/?$', PlatformsView.as_view(), name='platforms'),
url(r'^platform/(?P<platformname>[\w\.\-]+)/?$', PlatformView.as_view(), name='platform'),
url(r'^resource/(?P<urn>[\w\.\-\+\:]+)/?$', ResourceView.as_view(), name='resource'),
import json
# View for platforms
-class AdminView(LoginRequiredAutoLogoutView, ThemeView):
- template_name = "adminview.html"
+class UsersView(LoginRequiredAutoLogoutView, ThemeView):
+ template_name = "usersview.html"
def get_context_data(self, **kwargs):
page = Page(self.request)
# },
#)
- context = super(AdminView, self).get_context_data(**kwargs)
+ context = super(UsersView, self).get_context_data(**kwargs)
context['person'] = self.request.user
context['user_list'] = user_list
# more general variables expected in the template
context['title'] = 'Users in MySlice'
# the menu items on the top
- context['topmenu_items'] = topmenu_items_live('Admin', page)
+ context['topmenu_items'] = topmenu_items_live('Users', page)
# so we can sho who is logged
context['username'] = the_user(self.request)
context['theme'] = self.theme