Revision 063ae3a6
Added by Amos Benari over 11 years ago
- ID 063ae3a62515643613ec053df6c54a8c32cc29b5
app/controllers/application_controller.rb | ||
---|---|---|
|
||
if SETTINGS[:organizations_enabled]
|
||
orgs = Organization.my_organizations
|
||
Organization.current = if orgs.count == 1
|
||
Organization.current = if orgs.count == 1 && !User.current.admin?
|
||
orgs.first
|
||
elsif session[:org_id]
|
||
orgs.find(session[:org_id])
|
||
... | ... | |
|
||
if SETTINGS[:locations_enabled]
|
||
locations = Location.my_locations
|
||
Location.current = if locations.count == 1
|
||
Location.current = if locations.count == 1 && !User.current.admin?
|
||
locations.first
|
||
elsif session[:location_id]
|
||
locations.find(session[:location_id])
|
Also available in: Unified diff
admins can always reset the taxonomy filters to any