Revision acfbc458
Added by Marek Hulán about 10 years ago
app/controllers/api/v1/lookup_keys_controller.rb | ||
---|---|---|
module Api
|
||
module V1
|
||
class LookupKeysController < V1::BaseController
|
||
before_filter :find_resource, :only => %w{show update destroy}
|
||
before_filter(:only => %w{show update destroy}) { find_resource('external_variables') }
|
||
before_filter :setup_search_options, :only => :index
|
||
|
||
api :GET, "/lookup_keys/", "List all lookup_keys."
|
||
... | ... | |
param :per_page, String, :desc => "number of entries per request"
|
||
|
||
def index
|
||
@lookup_keys = LookupKey.search_for(*search_options).paginate(paginate_options)
|
||
@lookup_keys = LookupKey.
|
||
authorized(:view_external_variables).
|
||
search_for(*search_options).paginate(paginate_options)
|
||
end
|
||
|
||
api :GET, "/lookup_keys/:id/", "Show a lookup key."
|
Also available in: Unified diff
fixes #812 - new permissions model, user group role and nest support, role filters for better granularity
Contributions from: