Merge branch 'master' of ssh://git.onelab.eu/git/myslice
authorLoic Baron <loic.baron@lip6.fr>
Fri, 31 Jan 2014 15:23:24 +0000 (16:23 +0100)
committerLoic Baron <loic.baron@lip6.fr>
Fri, 31 Jan 2014 15:23:24 +0000 (16:23 +0100)
portal/accountview.py
portal/actions.py
portal/templates/account-view.html

index c06f578..f366555 100644 (file)
@@ -185,6 +185,7 @@ class AccountView(LoginRequiredAutoLogoutView):
         context['my_users'] = my_users
         context['my_slices'] = my_slices
         context['my_auths'] = my_auths
+        context['user_status'] = user_status
         context['person']   = self.request.user
         context['firstname'] = config.get('firstname',"?")
         context['lastname'] = config.get('lastname',"?")
@@ -337,9 +338,9 @@ def account_process(request):
                         user_params = { 'config': keypair, 'auth_type':'managed'}
                         manifold_update_account(request,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/")
         else:
index f57dc46..2707dd4 100644 (file)
@@ -274,6 +274,9 @@ def portal_validate_request(wsgi_request, request_ids):
 
             except Exception, e:
                 request_status['SFA user'] = {'status': False, 'description': str(e)}
+            
+            user_params = {'status':2}
+            manifold_update_user(request, request['email'],user_params)
 
             # MANIFOLD user should be added beforehand, during registration
             #try:
index 3c3d543..74a2a0f 100644 (file)
                        <th>Account Type</th>
                                <th>Account Delegation</th>
                        <th>User hrn</th>
+                               <th>User Status</th>
                        <!--<th>Pub Key</th> -->
                </tr>   
                        {% for row in principal_acc %}         
                        <td class="odd"> {{ row.account_type }} </td>
                                <td class="odd"> {{ row.delegation_type }} </td>
                                <td class="odd"> {{ row.usr_hrn }}  </td>
+                               <td class="odd"> {{ row.user_status }}  </td>
                <!--    <td class="even"> {{ row.usr_pubkey }} </td> -->
                </tr> 
                        {%endfor%}               
 
 
 
-
+{%if 'Enabled'  in user_status %}
 <h3 id="show-pending" class="plugin-show" style="display: block;">
 <span class="glyphicon glyphicon-chevron-right"></span>
 <a href="#" class="plugin-tooltip" data-toggle="tooltip" data-original-title="Show plugin &quot;Pending operations&quot; (QueryUpdater)"></a>Credentials</h3>
     </div>
 </div>
 </div>
+{%endif%} 
 
 </form>