ticket_states_controller.rb 747 B

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