2659: Fix infinite recursion while creating system_user.
[arvados.git] / services / api / app / models / user.rb
index a32ce39299228b324ec63a64be6e6f4a152af6b0..a47a4583cd533e272d9b5f850b4281aef75f26c3 100644 (file)
@@ -411,8 +411,8 @@ class User < ArvadosModel
 
   # Give the special "System group" permission to manage this user and
   # all of this user's stuff.
-  #
   def add_system_group_permission_link
+    return true if uuid == system_user_uuid
     act_as_system_user do
       Link.create(link_class: 'permission',
                   name: 'can_manage',