2014-12-27 21:01:09 +00:00
|
|
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
|
|
|
class JobsController < ApplicationController
|
2015-05-07 11:23:55 +00:00
|
|
|
before_action :authentication_check
|
2014-12-27 21:01:09 +00:00
|
|
|
|
|
|
|
def index
|
2016-06-30 08:24:03 +00:00
|
|
|
deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_index_render(Job, params)
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
2016-06-30 08:24:03 +00:00
|
|
|
deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_show_render(Job, params)
|
|
|
|
end
|
|
|
|
|
|
|
|
def create
|
2016-06-30 08:24:03 +00:00
|
|
|
deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_create_render(Job, params)
|
|
|
|
end
|
|
|
|
|
|
|
|
def update
|
2016-06-30 08:24:03 +00:00
|
|
|
deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_update_render(Job, params)
|
|
|
|
end
|
|
|
|
|
|
|
|
def destroy
|
2016-06-30 08:24:03 +00:00
|
|
|
deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_destory_render(Job, params)
|
|
|
|
end
|
2015-04-27 14:15:29 +00:00
|
|
|
end
|