diff --git a/app/controllers/calentries_controller.rb b/app/controllers/calentries_controller.rb index e4f4095..bb14973 100644 --- a/app/controllers/calentries_controller.rb +++ b/app/controllers/calentries_controller.rb @@ -1,7 +1,7 @@ class CalentriesController < ApplicationController # GET /calentries # GET /calentries.json - #load_and_authorize_resource + load_and_authorize_resource def index diff --git a/app/models/ability.rb b/app/models/ability.rb index 1cc4986..7d49731 100755 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -35,8 +35,8 @@ class Ability #----------------------------------------------------- # Rechteverwaltung fuer Informationen can [:show, :index,:faqs], Themengruppe, :public=>true - can [:show], Thema, :isdraft=>false - can :show, Frage + can [:show], Thema, :isdraft=>false, :themengruppe=>{:public=>true} + can :show, Frage if loggedin end if( user.has_role?("fetuser") || user.has_role?("fetadmin")) diff --git a/app/views/home/_search_results.html.erb b/app/views/home/_search_results.html.erb index fe722ad..5ffbffc 100644 --- a/app/views/home/_search_results.html.erb +++ b/app/views/home/_search_results.html.erb @@ -7,7 +7,6 @@ <%= link_to res, :class=>:linkbox do %> <%= render :partial=>res.class.to_s.pluralize.downcase+"/nlink", :object=>res %> <% end %> - <% end %> <% end %> diff --git a/app/views/neuigkeiten/show.html.erb b/app/views/neuigkeiten/show.html.erb index cbf4e26..62afa66 100755 --- a/app/views/neuigkeiten/show.html.erb +++ b/app/views/neuigkeiten/show.html.erb @@ -50,7 +50,7 @@ end <%= render ce unless ce.nil? %> <% end %> -
<%= link_to "new Calentry", new_calentry_path(:object_id=>@neuigkeit.id, :object_type=>"Neuigkeit"), :remote=>true %>
+
<%= link_to "new Calentry", new_calentry_path(:object_id=>@neuigkeit.id, :object_type=>"Neuigkeit"), :remote=>true if can? :edit, @neuigkeit %>
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %> <%= render partial: 'nlink_list_whole', :object=>@neuigkeit.nlinks %> diff --git a/config/sunspot.yml b/config/sunspot.yml index 5e81092..0beaf96 100644 --- a/config/sunspot.yml +++ b/config/sunspot.yml @@ -3,7 +3,8 @@ production: hostname: localhost port: 8983 log_level: WARNING - path: /solr/production + path: /solr/default #production #ollection1 #production +# solr_home: solr # read_timeout: 2 # open_timeout: 0.5 diff --git a/solr/conf/schema.xml b/solr/conf/schema.xml new file mode 100644 index 0000000..adcb9a8 --- /dev/null +++ b/solr/conf/schema.xml @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + + text + + + +