1 class CurrentApiClientHelper
2 extend CurrentApiClient
10 after :create do |user, evaluator|
11 CurrentApiClientHelper.act_as_system_user do
12 evaluator.join_groups.each do |g|
13 Link.create!(tail_uuid: user.uuid,
15 link_class: 'permission',
17 Link.create!(tail_uuid: g.uuid,
19 link_class: 'permission',
27 "https://example.com/#{rand(2**24).to_s(36)}"
29 factory :active_user do
31 after :create do |user|
32 CurrentApiClientHelper.act_as_system_user do
33 Link.create!(tail_uuid: user.uuid,
34 head_uuid: Group.where('uuid ~ ?', '-f+$').first.uuid,
35 link_class: 'permission',
40 to_create do |instance|
41 CurrentApiClientHelper.act_as_system_user do