ticket_priorities_controller.rb 978 B

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright (C) 2012-2016 Zammad Foundation, http://zammad-foundation.org/
  2. class TicketPrioritiesController < ApplicationController
  3. before_action :authentication_check
  4. # GET /ticket_priorities
  5. def index
  6. permission_check(['admin.object', 'ticket.agent', 'ticket.customer'])
  7. model_index_render(Ticket::Priority, params)
  8. end
  9. # GET /ticket_priorities/1
  10. def show
  11. permission_check(['admin.object', 'ticket.agent', 'ticket.customer'])
  12. model_show_render(Ticket::Priority, params)
  13. end
  14. # POST /ticket_priorities
  15. def create
  16. permission_check('admin.object')
  17. model_create_render(Ticket::Priority, params)
  18. end
  19. # PUT /ticket_priorities/1
  20. def update
  21. permission_check('admin.object')
  22. model_update_render(Ticket::Priority, params)
  23. end
  24. # DELETE /ticket_priorities/1
  25. def destroy
  26. permission_check('admin.object')
  27. model_references_check(Ticket::Priority, params)
  28. model_destory_render(Ticket::Priority, params)
  29. end
  30. end