Revision acfbc458
Added by Marek Hulán about 10 years ago
app/controllers/api/v1/fact_values_controller.rb | ||
---|---|---|
module Api
|
||
module V1
|
||
class FactValuesController < V1::BaseController
|
||
before_filter :find_resource, :only => %w{show update destroy}
|
||
before_filter :setup_search_options, :only => :index
|
||
|
||
api :GET, "/fact_values/", "List all fact values."
|
||
... | ... | |
param :per_page, String, :desc => "number of entries per request"
|
||
|
||
def index
|
||
values = FactValue.my_facts.no_timestamp_facts.
|
||
values = FactValue.
|
||
authorized(:view_facts).
|
||
my_facts.
|
||
no_timestamp_facts.
|
||
search_for(*search_options).paginate(paginate_options).
|
||
includes(:fact_name, :host)
|
||
render :json => FactValue.build_facts_hash(values.all)
|
Also available in: Unified diff
fixes #812 - new permissions model, user group role and nest support, role filters for better granularity
Contributions from: