[PATCH 3/4] redmine #3452: verify value of template to render in realms and provider_realms controller

Jozef Zigmund jzigmund at redhat.com
Tue Aug 7 17:55:12 UTC 2012


On Tue, 2012-07-31 at 16:03 -0400, Mo Morsi wrote:
> ---
>  src/app/controllers/provider_realms_controller.rb |    1 +
>  src/app/controllers/realms_controller.rb          |    1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/src/app/controllers/provider_realms_controller.rb b/src/app/controllers/provider_realms_controller.rb
> index f4ad966..9c9d48c 100644
> --- a/src/app/controllers/provider_realms_controller.rb
> +++ b/src/app/controllers/provider_realms_controller.rb
> @@ -34,6 +34,7 @@ class ProviderRealmsController < ApplicationController
>  
>      @tab_captions = [t('realms.tab_captions.properties'), t('realms.tab_captions.mapping')]
>      @details_tab = params[:details_tab].blank? ? 'properties' : params[:details_tab]
> +    @details_tab = 'properties' unless ['properties', 'mapping'].include?(@details_tab)
>  
>      @frontend_realms_for_provider = @realm.provider.frontend_realms
>      @frontend_realms = @realm.frontend_realms
> diff --git a/src/app/controllers/realms_controller.rb b/src/app/controllers/realms_controller.rb
> index 695f1e2..f908e43 100644
> --- a/src/app/controllers/realms_controller.rb
> +++ b/src/app/controllers/realms_controller.rb
> @@ -113,6 +113,7 @@ class RealmsController < ApplicationController
>      @title = @realm.name
>      @tab_captions = [t('realms.tab_captions.properties'), t('realms.tab_captions.mapping')]
>      @details_tab = params[:details_tab].blank? ? 'properties' : params[:details_tab]
> +    @details_tab = 'properties' unless ['properties', 'mapping'].include?(@details_tab)
>  
>      @backend_realm_targets = @realm.realm_backend_targets.select { |x| x.realm_or_provider_type == 'Realm' }
>      @backend_provider_targets = @realm.realm_backend_targets.select { |x| x.realm_or_provider_type == 'Provider' }

In both show actions aren't tabs .. so you could remove that lines.. pls
verify it before pushing.




More information about the aeolus-devel mailing list