[ARVADOS] updated: 602a0e46ee210602bb9606695808f7035e1336d9

git at public.curoverse.com git at public.curoverse.com
Tue Aug 5 15:05:26 EDT 2014


Summary of changes:
 apps/workbench/app/controllers/application_controller.rb | 6 ++++++
 apps/workbench/app/controllers/users_controller.rb       | 2 +-
 apps/workbench/app/views/users/_profile.html.erb         | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

       via  602a0e46ee210602bb9606695808f7035e1336d9 (commit)
       via  1c61d2595c8489bc577128156f78d57fa4c85b53 (commit)
      from  d7dc4d6026d2752b752b30dc627a22c158141ebb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 602a0e46ee210602bb9606695808f7035e1336d9
Author: radhika <radhika at curoverse.com>
Date:   Tue Aug 5 14:59:17 2014 -0400

    3296: When invoking sudo operations, skip profile check. Profile check is problematic when an admin user does "login as" a different user who has no profile set because after login as that user, the profile page is displayed and needs to be filled. To address this, send an additional "skip_profile" parameter when doing a "login as" or any other sudo operations.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index fd94cf8..3e9749a 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -418,6 +418,8 @@ class ApplicationController < ActionController::Base
         is_admin: user.is_admin,
         prefs: user.prefs
       }
+      session[:skip_profile] = params[:skip_profile]
+
       if !request.format.json? and request.method.in? ['GET', 'HEAD']
         # Repeat this request with api_token in the (new) session
         # cookie instead of the query string.  This prevents API
@@ -514,6 +516,10 @@ class ApplicationController < ActionController::Base
   def check_user_profile
     @profile_config = Rails.configuration.user_profile_form_fields
 
+    if params[:skip_profile] || session[:skip_profile]
+      return true
+    end
+
     if current_user && @profile_config
       missing_required_profile = false
 
diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb
index 0d6f624..5746520 100644
--- a/apps/workbench/app/controllers/users_controller.rb
+++ b/apps/workbench/app/controllers/users_controller.rb
@@ -111,7 +111,7 @@ class UsersController < ApplicationController
                                       owner_uuid: @object.uuid
                                     }
                                   })
-    redirect_to root_url(api_token: resp[:api_token])
+    redirect_to root_url(api_token: resp[:api_token], skip_profile: true)
   end
 
   def home

commit 1c61d2595c8489bc577128156f78d57fa4c85b53
Author: radhika <radhika at curoverse.com>
Date:   Tue Aug 5 14:32:18 2014 -0400

    3296: save button placement

diff --git a/apps/workbench/app/views/users/_profile.html.erb b/apps/workbench/app/views/users/_profile.html.erb
index 7cc786a..4bfc607 100644
--- a/apps/workbench/app/views/users/_profile.html.erb
+++ b/apps/workbench/app/views/users/_profile.html.erb
@@ -66,7 +66,7 @@
               <% end %>
 
               <div class="form-group">
-                <div class="col-sm-offset-2 col-sm-10">
+                <div class="col-sm-offset-3 col-sm-9">
                   <button type="submit" class="btn btn-primary">Save profile</button>
                 </div>
               </div>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list