trabajo-afectivo/app/controllers/object_manager_attributes_controller.rb

47 lines
1.3 KiB
Ruby
Raw Normal View History

2014-11-02 19:44:15 +00:00
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class ObjectManagerAttributesController < ApplicationController
before_filter :authentication_check
# GET /object_manager_attributes_list
def list
2015-02-15 09:12:27 +00:00
return if deny_if_not_role(Z_ROLENAME_ADMIN)
2014-11-02 19:44:15 +00:00
render :json => {
2014-11-06 23:37:05 +00:00
:objects => ObjectManager.listFrontendObjects,
2014-11-02 19:44:15 +00:00
}
#model_index_render(ObjectManager::Attribute, params)
end
# GET /object_manager_attributes
def index
2015-02-15 09:12:27 +00:00
return if deny_if_not_role(Z_ROLENAME_ADMIN)
2014-11-02 19:44:15 +00:00
render :json => ObjectManager::Attribute.list_full
#model_index_render(ObjectManager::Attribute, params)
end
# GET /object_manager_attributes/1
def show
2015-02-15 09:12:27 +00:00
return if deny_if_not_role(Z_ROLENAME_ADMIN)
2014-11-02 19:44:15 +00:00
model_show_render(ObjectManager::Attribute, params)
end
# POST /object_manager_attributes
def create
2015-02-15 09:12:27 +00:00
return if deny_if_not_role(Z_ROLENAME_ADMIN)
2014-11-02 19:44:15 +00:00
model_create_render(ObjectManager::Attribute, params)
end
# PUT /object_manager_attributes/1
def update
2015-02-15 09:12:27 +00:00
return if deny_if_not_role(Z_ROLENAME_ADMIN)
2014-11-02 19:44:15 +00:00
model_update_render(ObjectManager::Attribute, params)
end
# DELETE /object_manager_attributes/1
def destroy
2015-02-15 09:12:27 +00:00
return if deny_if_not_role(Z_ROLENAME_ADMIN)
2014-11-02 19:44:15 +00:00
model_destory_render(ObjectManager::Attribute, params)
end
end