- Link.create(link_class: 'permission',
- name: 'can_manage',
- tail_kind: 'arvados#group',
- tail_uuid: system_group_uuid,
- head_kind: 'arvados#user',
- head_uuid: self.uuid)
+ act_as_system_user do
+ Link.create(link_class: 'permission',
+ name: 'can_manage',
+ tail_uuid: system_group_uuid,
+ head_uuid: self.uuid)
+ end
+ end
+
+ # Send admin notifications
+ def send_admin_notifications
+ AdminNotifier.new_user(self).deliver
+ if not self.is_active then
+ AdminNotifier.new_inactive_user(self).deliver
+ end