2014-12-27 21:01:09 +00:00
|
|
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
|
|
|
class JobsController < ApplicationController
|
|
|
|
before_filter :authentication_check
|
|
|
|
|
|
|
|
def index
|
2015-02-15 09:12:27 +00:00
|
|
|
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_index_render(Job, params)
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
2015-02-15 09:12:27 +00:00
|
|
|
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_show_render(Job, params)
|
|
|
|
end
|
|
|
|
|
|
|
|
def create
|
2015-02-15 09:12:27 +00:00
|
|
|
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_create_render(Job, params)
|
|
|
|
end
|
|
|
|
|
|
|
|
def update
|
2015-02-15 09:12:27 +00:00
|
|
|
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_update_render(Job, params)
|
|
|
|
end
|
|
|
|
|
|
|
|
def destroy
|
2015-02-15 09:12:27 +00:00
|
|
|
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
2014-12-27 21:01:09 +00:00
|
|
|
model_destory_render(Job, params)
|
|
|
|
end
|
|
|
|
end
|