On Fri, 2010-09-24 at 15:29 +0200, [email protected] wrote:
> From: Tomas Sedovic <[email protected]>
> 
> This new page is capable of viewing/updating/creating new providers, so the
> funtionality has been moved there.
> ---
>  src/app/controllers/provider_controller.rb |   34 +++++++++++++++-
>  src/app/views/provider/_providers.haml     |   19 +++++++--
>  src/app/views/provider/show.haml           |   52 ++++++++++++++++++++------
>  src/config/locales/en.yml                  |   13 ++++++
>  src/config/navigation.rb                   |   56 
> ++++++++++++++--------------
>  5 files changed, 126 insertions(+), 48 deletions(-)
> 
> diff --git a/src/app/controllers/provider_controller.rb 
> b/src/app/controllers/provider_controller.rb
> index af8c3f9..8f9fce3 100644
> --- a/src/app/controllers/provider_controller.rb
> +++ b/src/app/controllers/provider_controller.rb
> @@ -21,20 +21,30 @@
>  
>  class ProviderController < ApplicationController
>    before_filter :require_user
> +  before_filter :load_providers
Since this method is for view perms only, it should be limited to
actions that require view (just provide an array here)
>  
>    def index
> -    @providers = Provider.list_for_user(@current_user, 
> Privilege::PROVIDER_VIEW)
>    end
>  
>    def show
> +    @providers = Provider.list_for_user(@current_user, 
> Privilege::PROVIDER_VIEW)
This should already be taken care of with the filter ^

Aside from those minor nits, ACK.

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to