Commit 18842529df063744ce86e712d4115fb15cabc0d0
Exists in
master
and in
29 other branches
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 | 84 | end |
| 85 | 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 | 98 | def asset_product_properties(product) |
| 88 | 99 | properties = [] |
| 89 | 100 | properties << { :name => _('Bsc'), :content => lambda { link_to(product.bsc.name, product.bsc.url) } } if product.bsc | ... | ... |