[ARVADOS] updated: a614455f3b617326e2dc616bc08e28f9d7f9fb8c

git at public.curoverse.com git at public.curoverse.com
Fri Jun 20 10:49:22 EDT 2014


Summary of changes:
 .../app/controllers/application_controller.rb      |  5 ++++
 .../app/views/layouts/application.html.erb         | 15 ++++++++++--
 apps/workbench/app/views/projects/index.html.erb   | 27 ++++++++++++++++++++++
 3 files changed, 45 insertions(+), 2 deletions(-)

       via  a614455f3b617326e2dc616bc08e28f9d7f9fb8c (commit)
       via  4213e3b9d74877d430f175927088ec7b163d5d41 (commit)
      from  96e31a3c52a7d708ed571c3d6139b780efc1f7ce (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 a614455f3b617326e2dc616bc08e28f9d7f9fb8c
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 20 10:49:00 2014 -0400

    2659: inactive user

diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index fb15c0f..9d36ea0 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -89,6 +89,15 @@
               <li role="presentation"><a href="/api_client_authorizations" role="menuitem"><i class="fa fa-ticket fa-fw"></i> Manage API tokens</a></li>
               <li role="presentation" class="divider"></li>
               <% end %>
+
+              <% if !current_user.is_active %> 
+                <% if !current_user.is_invited %>
+                  <li role="presentation"><a href="/users/inactive" role="menuitem"><i class="fa fa-fw"></i> Inactive </a></li>
+                <% else %>
+                  <li role="presentation"><a href="/user_agreements" role="menuitem"><i class="fa fa-fw"></i> Inactive </a></li>
+                <% end %>
+              <% end %>
+
               <li role="presentation"><a href="<%= logout_path %>" role="menuitem"><i class="fa fa-sign-out fa-fw"></i> Log out</a></li>
               <% if current_user.is_active and
                     (@notifications || []).length > 0 %>
@@ -103,10 +112,6 @@
           <% else %>
             <% if is_anonymous(current_user) %>
               <li><a href="<%= arvados_api_client.arvados_login_url(return_to: root_url) %>">Log in</a></li>
-            <% elsif !current_user.is_invited %>
-              <li><a href="<%= users/inactive %>">Inactive</a></li>
-            <% else %>
-              <li><a href="<%= user_agreements/index %>">Inactive</a></li>
             <% end %>
           <% end %>
           <% end %>

commit 4213e3b9d74877d430f175927088ec7b163d5d41
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 20 09:10:17 2014 -0400

    2659: notification panel displays text based on anonymous or univited or needs agreements.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index b7ec764..4db0897 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -927,4 +927,9 @@ class ApplicationController < ActionController::Base
   def is_anonymous user
     return user.uuid == @@anonymous_user.andand.uuid
   end
+  helper_method :anonymous_login_enabled
+  def anonymous_login_enabled
+    return @@anonymous_user
+  end
+
 end
diff --git a/apps/workbench/app/views/layouts/application.html.erb b/apps/workbench/app/views/layouts/application.html.erb
index c50fe9a..fb15c0f 100644
--- a/apps/workbench/app/views/layouts/application.html.erb
+++ b/apps/workbench/app/views/layouts/application.html.erb
@@ -101,7 +101,13 @@
             </ul>
           </li>
           <% else %>
-            <li><a href="<%= arvados_api_client.arvados_login_url(return_to: root_url) %>">Log in</a></li>
+            <% if is_anonymous(current_user) %>
+              <li><a href="<%= arvados_api_client.arvados_login_url(return_to: root_url) %>">Log in</a></li>
+            <% elsif !current_user.is_invited %>
+              <li><a href="<%= users/inactive %>">Inactive</a></li>
+            <% else %>
+              <li><a href="<%= user_agreements/index %>">Inactive</a></li>
+            <% end %>
           <% end %>
           <% end %>
 
@@ -165,7 +171,7 @@
       </div><!-- /.navbar-collapse -->
     </nav>
 
-    <% if current_user %>
+    <% if current_user.andand.is_active || (current_user && anonymous_login_enabled)%>
       <nav class="navbar navbar-default breadcrumbs" role="navigation">
         <ul class="nav navbar-nav navbar-left">
           <li class="dropdown">
diff --git a/apps/workbench/app/views/projects/index.html.erb b/apps/workbench/app/views/projects/index.html.erb
index 85141aa..6c9f6f2 100644
--- a/apps/workbench/app/views/projects/index.html.erb
+++ b/apps/workbench/app/views/projects/index.html.erb
@@ -44,6 +44,33 @@
           <%= render partial: 'index_projects', locals: {tree: my_project_tree, show_root_node: false} %>
         </div>
       </div>
+      <% elsif current_user %>
+        <% if is_anonymous current_user %>
+          <div class="panel panel-default">
+            <div class="panel-body">
+              <p>
+                The "Log in" button will show you a Google sign-in page.
+              </p> <p>
+              	After you assure Google that you want to log in here with your
+              	Google account, you will be redirected back here to
+              	<%= Rails.configuration.site_name %>.
+              </p>
+            </div>
+          </div>
+        <% elsif !current_user.is_invited %>    <%# not invited %>
+          <div class="panel panel-default">
+            <div class="panel-body">
+              <p> Your account is inactive.</p>
+              <p> An administrator must activate your account before you can get any further. </p>
+            </div>
+          </div>
+        <% else %>    <%# does not meet user agreements %>
+          <div class="panel panel-default">
+            <div class="panel-body">
+              <p> Please indicate that you have read and accepted the user agreement </p>
+            </div>
+          </div>
+        <% end %>
       <% end %>
     </div>
     <div class="col-sm-6">

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list