3687: Add comment about redundant lookup.
[arvados.git] / services / api / app / models / user.rb
index f283ea3ef8f2e8d1911a46534c65bd50b41f837a..6e7facd5d550ee45bd948a255e28e5b18ddec6cb 100644 (file)
@@ -83,7 +83,10 @@ class User < ArvadosModel
                          end
       if sufficient_perms
         # Check permission links with head_uuid pointing directly at
-        # the target object
+        # the target object. If target is a Group, this is redundant
+        # and will fail except [a] if permission caching is broken or
+        # [b] during a race condition, where a permission link has
+        # *just* been added.
         if Link.where(link_class: 'permission',
                       name: sufficient_perms,
                       tail_uuid: groups_i_can(action) + [self.uuid],