Commit 0c3de4a1b09d152d7bb5eb539544c39f5ef9cbac

Authored by Francisco Júnior
1 parent 2005326a

hide the button if user doesn't have permission to create content

plugins/dspace/views/content_viewer/community.html.erb
... ... @@ -3,7 +3,7 @@
3 3  
4 4 <div id="dspace_library">
5 5  
6   - <% if true %>
  6 + <% if dspace_community.allow_create?(user) %>
7 7  
8 8 <div id="actions">
9 9 <%= content_tag('a', :href => url_for({:controller => 'cms', :action => 'new', :type => "DspacePlugin::Collection", :parent_id => dspace_community.id}), :class => 'button with-text icon-add') do %>
... ...
plugins/dspace/views/content_viewer/library.html.erb
1 1 <div id="dspace_library">
2 2  
3   - <% if true %>
  3 + <% if dspace_library.allow_create?(user) %>
4 4  
5 5 <div id="actions">
6 6 <%= content_tag('a', :href => url_for({:controller => 'cms', :action => 'new', :type => "DspacePlugin::Communityy", :parent_id => dspace_library.id}), :class => 'button with-text icon-add') do %>
... ...