系统管理员增加组织管理员的权限
This commit is contained in:
parent
5e72734bee
commit
a15f7fa97b
|
@ -825,6 +825,9 @@ class User < Principal
|
|||
end
|
||||
|
||||
def admin_of_org?(org)
|
||||
if self.admin?
|
||||
return true
|
||||
end
|
||||
if OrgMember.where("user_id =? and organization_id =?", self.id, org.id).count == 0
|
||||
return false
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue