Merge Request #8
← To merge requests
From
pkg_fixes
into
master
Commits (1)
-
Signed-off-by: Tallys Martins <tallysmartins@yahoo.com.br>
Showing
1 changed file
Show diff stats
lib/gov_user_plugin.rb
| @@ -236,17 +236,17 @@ class GovUserPlugin < Noosfero::Plugin | @@ -236,17 +236,17 @@ class GovUserPlugin < Noosfero::Plugin | ||
| 236 | end | 236 | end |
| 237 | 237 | ||
| 238 | def organization_ratings_plugin_extra_fields_show_data user_rating | 238 | def organization_ratings_plugin_extra_fields_show_data user_rating |
| 239 | - if logged_in? | ||
| 240 | - is_admin = environment.admins.include?(current_user.person) | ||
| 241 | - is_admin ||= user_rating.organization.admins.include?(current_user.person) | ||
| 242 | - | ||
| 243 | - if is_admin and context.profile.software? | ||
| 244 | - Proc::new { | ||
| 245 | - render :file => 'organization_ratings_extra_fields_show_institution', | ||
| 246 | - :locals => {:user_rating => user_rating} | ||
| 247 | - } | 239 | + Proc::new { |
| 240 | + if logged_in? | ||
| 241 | + is_admin = environment.admins.include?(current_user.person) | ||
| 242 | + is_admin ||= user_rating.organization.admins.include?(current_user.person) | ||
| 243 | + | ||
| 244 | + if is_admin and context.profile.software? | ||
| 245 | + render :file => 'organization_ratings_extra_fields_show_institution', | ||
| 246 | + :locals => {:user_rating => user_rating} | ||
| 247 | + end | ||
| 248 | end | 248 | end |
| 249 | - end | 249 | + } |
| 250 | end | 250 | end |
| 251 | 251 | ||
| 252 | private | 252 | private |
-
mentioned in commit 481d59ae4afbeac779b977480c531d60a1f4ce28