object_manager_attributes_controller.rb 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
  2. class ObjectManagerAttributesController < ApplicationController
  3. before_filter :authentication_check
  4. # GET /object_manager_attributes_list
  5. def list
  6. return if deny_if_not_role('Admin')
  7. render :json => {
  8. :objects => ObjectManager.listObjects,
  9. }
  10. #model_index_render(ObjectManager::Attribute, params)
  11. end
  12. # GET /object_manager_attributes
  13. def index
  14. return if deny_if_not_role('Admin')
  15. render :json => ObjectManager::Attribute.list_full
  16. #model_index_render(ObjectManager::Attribute, params)
  17. end
  18. # GET /object_manager_attributes/1
  19. def show
  20. return if deny_if_not_role('Admin')
  21. model_show_render(ObjectManager::Attribute, params)
  22. end
  23. # POST /object_manager_attributes
  24. def create
  25. return if deny_if_not_role('Admin')
  26. model_create_render(ObjectManager::Attribute, params)
  27. end
  28. # PUT /object_manager_attributes/1
  29. def update
  30. return if deny_if_not_role('Admin')
  31. model_update_render(ObjectManager::Attribute, params)
  32. end
  33. # DELETE /object_manager_attributes/1
  34. def destroy
  35. return if deny_if_not_role('Admin')
  36. model_destory_render(ObjectManager::Attribute, params)
  37. end
  38. end