Commit ebfef58a386b2fb0ae6c67d6f3caa76c4d415b34
1 parent
9efcdbc1
Exists in
master
and in
2 other branches
Fix bug on rating organization
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
lib/gov_user_plugin.rb
... | ... | @@ -236,12 +236,14 @@ class GovUserPlugin < Noosfero::Plugin |
236 | 236 | end |
237 | 237 | |
238 | 238 | def organization_ratings_plugin_extra_fields_show_data user_rating |
239 | + gov_user_self = self | |
240 | + | |
239 | 241 | Proc::new { |
240 | 242 | if logged_in? |
241 | 243 | is_admin = environment.admins.include?(current_user.person) |
242 | 244 | is_admin ||= user_rating.organization.admins.include?(current_user.person) |
243 | 245 | |
244 | - if is_admin and context.profile.software? | |
246 | + if is_admin and gov_user_self.context.profile.software? | |
245 | 247 | render :file => 'organization_ratings_extra_fields_show_institution', |
246 | 248 | :locals => {:user_rating => user_rating} |
247 | 249 | end | ... | ... |