diff --git a/app/controllers/ticket_states_controller.rb b/app/controllers/ticket_states_controller.rb index 60bf20de8..61fd71678 100644 --- a/app/controllers/ticket_states_controller.rb +++ b/app/controllers/ticket_states_controller.rb @@ -15,19 +15,19 @@ class TicketStatesController < ApplicationController # POST /ticket_states def create - return if deny_if_not_role('Admin') + return if deny_if_not_role(Z_ROLENAME_ADMIN) model_create_render(Ticket::State, params) end # PUT /ticket_states/1 def update - return if deny_if_not_role('Admin') + return if deny_if_not_role(Z_ROLENAME_ADMIN) model_update_render(Ticket::State, params) end # DELETE /ticket_states/1 def destroy - return if deny_if_not_role('Admin') + return if deny_if_not_role(Z_ROLENAME_ADMIN) model_destory_render(Ticket::State, params) end end diff --git a/config/initializers/zammad_constants.rb b/config/initializers/zammad_constants.rb new file mode 100644 index 000000000..1bda31d5f --- /dev/null +++ b/config/initializers/zammad_constants.rb @@ -0,0 +1,9 @@ +# Copyright (C) 2014 Zammad Foundation, http://zammad-foundation.org/ + +# Prefix all zammad constants w/ Z_ + +# Prefix all rolenames with Z_ROLENAME +Z_ROLENAME_ADMIN = 'Admin' +Z_ROLENAME_AGENT = 'Agent' +Z_ROLENAME_CUSTOMER = 'Customer' + diff --git a/db/seeds.rb b/db/seeds.rb index d76db3a97..d79219a2b 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1712,7 +1712,7 @@ Translation.create_if_not_exists( :locale => 'de', :source => "Groups", :target Translation.create_if_not_exists( :locale => 'de', :source => "Group", :target => "Gruppe" ) Translation.create_if_not_exists( :locale => 'de', :source => "Organizations", :target => "Organisationen" ) Translation.create_if_not_exists( :locale => 'de', :source => "Organization", :target => "Organisation" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Recent Viewed", :target => "Zuletzt angesehen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Recently Viewed", :target => "Zuletzt angesehen" ) Translation.create_if_not_exists( :locale => 'de', :source => "Security", :target => "Sicherheit" ) Translation.create_if_not_exists( :locale => 'de', :source => "From", :target => "Von" ) Translation.create_if_not_exists( :locale => 'de', :source => "Title", :target => "Titel" ) @@ -1833,7 +1833,7 @@ Translation.create_if_not_exists( :locale => 'de', :source => "My Tickets", :tar Translation.create_if_not_exists( :locale => 'de', :source => "My Organization Tickets", :target => "Meine Organisations Tickets" ) Translation.create_if_not_exists( :locale => 'de', :source => "My Organization", :target => "Meine Organisation" ) Translation.create_if_not_exists( :locale => 'de', :source => "Assignment Timeout", :target => "Zeitliche Zuweisungsüberschritung" ) -Translation.create_if_not_exists( :locale => 'de', :source => "We've sent password reset instructions to your email address.", :target => "Wir haben Ihnen die Anleitung zum zurücksetzen Ihres Passworts an Ihre E-Mail-Adresse gesendet." ) +Translation.create_if_not_exists( :locale => 'de', :source => "We've sent password reset instructions to your email address.", :target => "Wir haben Ihnen die Anleitung zum Zurücksetzen Ihres Passworts an Ihre E-Mail-Adresse gesendet." ) Translation.create_if_not_exists( :locale => 'de', :source => "Enter your username or email address", :target => "Bitte geben Sie Ihren Benutzernamen oder E-Mail-Adresse ein" ) Translation.create_if_not_exists( :locale => 'de', :source => "Choose your new password.", :target => "Wählen Sie Ihr neues Passwort." ) Translation.create_if_not_exists( :locale => 'de', :source => "Woo hoo! Your password has been changed!", :target => "Vielen Dank, Ihr Passwort wurde geändert!" )