Merge branch '2800-python-global-state' into 2800-pgs
[arvados.git] / services / api / app / controllers / arvados / v1 / groups_controller.rb
index f51f37aedbd29fcfb17558a6f9af1b852a053a2b..17be40a57ee449a6a0902409ed1aa9ae7853be8a 100644 (file)
@@ -13,9 +13,20 @@ class Arvados::V1::GroupsController < ApplicationController
   end
 
   def render_404_if_no_object
-    if params[:action] == 'contents' and !params[:uuid]
-      # OK!
-      @object = nil
+    if params[:action] == 'contents'
+      if !params[:uuid]
+        # OK!
+        @object = nil
+        true
+      elsif @object
+        # Project group
+        true
+      elsif (@object = User.where(uuid: params[:uuid]).first)
+        # "Home" pseudo-project
+        true
+      else
+        super
+      end
     else
       super
     end