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
|
||||
all = []
|
||||
if !@user.role?('Customer')
|
||||
all = Organization.all
|
||||
elsif @user.organization_id
|
||||
all = Organization.where(id: @user.organization_id)
|
||||
|
||||
if @user.organization_id
|
||||
all = Organization.lookup(id: @user.organization_id)
|
||||
end
|
||||
|
||||
all
|
||||
|
|
Loading…
Reference in a new issue