初始化单点登录用户同步用户角色
This commit is contained in:
parent
60b4639448
commit
4c066f9ad3
|
@ -27,8 +27,10 @@ class SsosController < ApplicationController
|
|||
## 加入组织
|
||||
@organization = Organization.find(82)
|
||||
unless @organization.org_members.exists?(user_id: sso.user_id)
|
||||
member = OrgMember.new(:user_id => sso.user_id)
|
||||
member = OrgMember.create(:user_id => sso.user_id, :created_at => Time.now)
|
||||
# member = OrgMember.new(:user_id => sso.user_id)
|
||||
@organization.org_members << member
|
||||
OrgMemberRole.create(:org_member_id => member.id, :role_id => 12)
|
||||
end
|
||||
|
||||
## 选择性跳转
|
||||
|
|
Loading…
Reference in New Issue