Just push related user organisation to clients.

This commit is contained in:
Martin Edenhofer 2016-05-16 17:03:19 +02:00
parent 8ebe752ee1
commit 7ed7bfb670

View file

@ -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