ticket_priorities_controller.rb 786 B

123456789101112131415161718192021222324252627282930313233
  1. # Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
  2. class TicketPrioritiesController < ApplicationController
  3. before_filter :authentication_check
  4. # GET /ticket_priorities
  5. def index
  6. model_index_render(Ticket::Priority, params)
  7. end
  8. # GET /ticket_priorities/1
  9. def show
  10. model_show_render(Ticket::Priority, params)
  11. end
  12. # POST /ticket_priorities
  13. def create
  14. return if deny_if_not_role('Admin')
  15. model_create_render(Ticket::Priority, params)
  16. end
  17. # PUT /ticket_priorities/1
  18. def update
  19. return if deny_if_not_role('Admin')
  20. model_update_render(Ticket::Priority, params)
  21. end
  22. # DELETE /ticket_priorities/1
  23. def destroy
  24. return if deny_if_not_role('Admin')
  25. model_destory_render(Ticket::Priority, params)
  26. end
  27. end