Just push related user organisation to clients.
This commit is contained in:
parent
8ebe752ee1
commit
7ed7bfb670
1 changed files with 3 additions and 4 deletions
|
@ -5,10 +5,9 @@ class Sessions::Backend::Collections::Organization < Sessions::Backend::Collecti
|
||||||
|
|
||||||
# get whole collection
|
# get whole collection
|
||||||
all = []
|
all = []
|
||||||
if !@user.role?('Customer')
|
|
||||||
all = Organization.all
|
if @user.organization_id
|
||||||
elsif @user.organization_id
|
all = Organization.lookup(id: @user.organization_id)
|
||||||
all = Organization.where(id: @user.organization_id)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
all
|
all
|
||||||
|
|
Loading…
Reference in a new issue