Revision ebecada6
Added by Tomer Brisker about 5 years ago
app/views/api/v2/users/main.json.rabl | ||
---|---|---|
|
||
node(:effective_admin) { |u| u.admin? }
|
||
|
||
if SETTINGS[:locations_enabled]
|
||
child :default_location => :default_location do
|
||
extends "api/v2/taxonomies/base", :taxonomy => :location
|
||
end
|
||
child :locations => :locations do
|
||
attributes :id, :name
|
||
end
|
||
child :default_location => :default_location do
|
||
extends "api/v2/taxonomies/base", :taxonomy => :location
|
||
end
|
||
child :locations => :locations do
|
||
attributes :id, :name
|
||
end
|
||
|
||
if SETTINGS[:organizations_enabled]
|
||
child :default_organization => :default_organization do
|
||
extends "api/v2/taxonomies/base"
|
||
end
|
||
child :organizations => :organizations do
|
||
attributes :id, :name
|
||
end
|
||
child :default_organization => :default_organization do
|
||
extends "api/v2/taxonomies/base"
|
||
end
|
||
child :organizations => :organizations do
|
||
attributes :id, :name
|
||
end
|
Also available in: Unified diff
Fixes #26508 - Remove taxonomy setting checks from api