diff --git a/app/models/user.rb b/app/models/user.rb index c2a7317e7..aa02ecb4c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -695,6 +695,10 @@ class User < ApplicationRecord LimitForbidControl::UserLogin.new(self).clear end + def from_sub_site? + laboratory_id.present? && laboratory_id != 1 + end + protected def validate_password_length # 管理员的初始密码是5位 diff --git a/app/views/admins/identity_authentications/shared/_list.html.erb b/app/views/admins/identity_authentications/shared/_list.html.erb index e1c603215..607feb93a 100644 --- a/app/views/admins/identity_authentications/shared/_list.html.erb +++ b/app/views/admins/identity_authentications/shared/_list.html.erb @@ -43,6 +43,9 @@ <%= link_to "/users/#{user.login}", class: 'identity-authentication-avatar', target: '_blank', data: { toggle: 'tooltip', title: '个人主页' } do %> <% end %> + <% if user.from_sub_site? %> + 合作 + <% end %>