From d14583d11209524e04d4fe215cb5a956091f0832 Mon Sep 17 00:00:00 2001 From: rkaldung Date: Mon, 2 Feb 2015 13:25:17 +0100 Subject: [PATCH 1/5] fixed typo --- db/seeds.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 8ceb17f73..c15a64c45 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1697,7 +1697,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" ) @@ -1818,7 +1818,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!" ) From ac43a0a104bc736d2535f0efde1508c87bc00b4e Mon Sep 17 00:00:00 2001 From: rkaldung Date: Thu, 12 Feb 2015 20:26:30 +0100 Subject: [PATCH 2/5] using constants instead of literals --- app/controllers/ticket_states_controller.rb | 6 +++--- config/initializers/zammad_constants.rb | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 config/initializers/zammad_constants.rb 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..c216e772c --- /dev/null +++ b/config/initializers/zammad_constants.rb @@ -0,0 +1,7 @@ +# 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' + From a5b94f5498ba330b3cc4a09d8c6d0678a58b4c1b Mon Sep 17 00:00:00 2001 From: rkaldung Date: Thu, 12 Feb 2015 20:32:54 +0100 Subject: [PATCH 3/5] added more constants for roles --- config/initializers/zammad_constants.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/initializers/zammad_constants.rb b/config/initializers/zammad_constants.rb index c216e772c..1bda31d5f 100644 --- a/config/initializers/zammad_constants.rb +++ b/config/initializers/zammad_constants.rb @@ -4,4 +4,6 @@ # Prefix all rolenames with Z_ROLENAME Z_ROLENAME_ADMIN = 'Admin' +Z_ROLENAME_AGENT = 'Agent' +Z_ROLENAME_CUSTOMER = 'Customer' From a4e388e840eac17577ce6f70e8e636ac05efb4c3 Mon Sep 17 00:00:00 2001 From: rkaldung Date: Fri, 13 Feb 2015 11:41:24 +0100 Subject: [PATCH 4/5] updated mail due to Outlook ContentID prob --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 87338c24f..a543f11de 100644 --- a/Gemfile +++ b/Gemfile @@ -31,7 +31,7 @@ gem 'omniauth-google-oauth2' gem 'twitter', '~> 5.13.0' gem 'koala' -gem 'mail', '~> 2.5.0' +gem 'mail', '~> 2.6.0' gem 'mime-types' From f17d2f17b503fdc2ad2f21013aeb3d007734a9be Mon Sep 17 00:00:00 2001 From: rkaldung Date: Fri, 13 Feb 2015 12:54:43 +0100 Subject: [PATCH 5/5] switched back --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index a543f11de..87338c24f 100644 --- a/Gemfile +++ b/Gemfile @@ -31,7 +31,7 @@ gem 'omniauth-google-oauth2' gem 'twitter', '~> 5.13.0' gem 'koala' -gem 'mail', '~> 2.6.0' +gem 'mail', '~> 2.5.0' gem 'mime-types'