Revision acfbc458
Added by Marek Hulán about 10 years ago
app/controllers/api/v2/fact_values_controller.rb | ||
---|---|---|
module Api
|
||
module V2
|
||
class FactValuesController < V2::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."
|
||
... | ... | |
@fact_values = FactValue.build_facts_hash(values.all)
|
||
end
|
||
|
||
def resource_scope
|
||
FactValue.my_facts.no_timestamp_facts
|
||
def resource_scope(controller = controller_name)
|
||
FactValue.authorized(:view_facts).my_facts.no_timestamp_facts
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
fixes #812 - new permissions model, user group role and nest support, role filters for better granularity
Contributions from: