Commit 18842529df063744ce86e712d4115fb15cabc0d0

Authored by Joenio Costa
2 parents a0b8daa4 f5acdbd0

Merge commit 'refs/merge-requests/46' of git://gitorious.org/noosfero/noosfero into stable

Showing 1 changed file with 11 additions and 0 deletions   Show diff stats
plugins/bsc/lib/bsc_plugin.rb
@@ -84,6 +84,17 @@ class BscPlugin < Noosfero::Plugin @@ -84,6 +84,17 @@ class BscPlugin < Noosfero::Plugin
84 end 84 end
85 end 85 end
86 86
  87 + def manage_products_controller_filters
  88 + if bsc?(profile)
  89 + [{ :type => 'before_filter',
  90 + :method_name => 'manage_products_bsc_destroy_access',
  91 + :options => {:only => :destroy},
  92 + :block => lambda { render_access_denied } }]
  93 + else
  94 + []
  95 + end
  96 + end
  97 +
87 def asset_product_properties(product) 98 def asset_product_properties(product)
88 properties = [] 99 properties = []
89 properties << { :name => _('Bsc'), :content => lambda { link_to(product.bsc.name, product.bsc.url) } } if product.bsc 100 properties << { :name => _('Bsc'), :content => lambda { link_to(product.bsc.name, product.bsc.url) } } if product.bsc