2659: Fix infinite recursion while creating system_user.
authorTom Clegg <tom@curoverse.com>
Wed, 4 Feb 2015 03:12:06 +0000 (22:12 -0500)
committerTom Clegg <tom@curoverse.com>
Wed, 4 Feb 2015 03:16:29 +0000 (22:16 -0500)
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',