From b6219c149a77c87053d398e0febcceba9c1977d6 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Fri, 22 Jan 2016 16:10:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=80=E4=B8=8Bbug:1.?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E4=B8=8D=E8=83=BD=E5=9B=9E=E5=A4=8D=EF=BC=9B?= =?UTF-8?q?2.=E7=BB=84=E7=BB=87=E9=80=9A=E7=9F=A5=E4=BD=9C=E8=80=85?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=BC=96=E8=BE=91=E5=92=8C=E5=88=A0=E9=99=A4?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 3 ++- app/views/organizations/_org_subfield_news.html.erb | 2 +- app/views/projects/_project_news.html.erb | 2 +- app/views/users/_course_news.html.erb | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cbf2c30bb..783e7d323 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -312,7 +312,8 @@ class ApplicationController < ActionController::Base elsif @course allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @course || @courses, :global => global) else - allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project || @projects, :global => global) + # allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project || @projects, :global => global) + allowed = true end allowed end diff --git a/app/views/organizations/_org_subfield_news.html.erb b/app/views/organizations/_org_subfield_news.html.erb index 1e7ae72df..2de5b6571 100644 --- a/app/views/organizations/_org_subfield_news.html.erb +++ b/app/views/organizations/_org_subfield_news.html.erb @@ -39,7 +39,7 @@
  • <%= link_to( l(:button_edit), - {:action => 'edit', :id => activity}, + {:controller => 'news', :action => 'edit', :id => activity}, :class => 'postOptionLink' ) if activity.author == User.current %>
  • diff --git a/app/views/projects/_project_news.html.erb b/app/views/projects/_project_news.html.erb index 2614462d7..457a78b6c 100644 --- a/app/views/projects/_project_news.html.erb +++ b/app/views/projects/_project_news.html.erb @@ -108,7 +108,7 @@
    <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> - +
    diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index 30053f6c6..672b2e2e9 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -44,7 +44,7 @@
  • <%= link_to( l(:button_edit), - {:action => 'edit', :id => activity}, + {controller:'news', :action => 'edit', :id => activity.id}, :class => 'postOptionLink' ) if User.current.allowed_to?(:manage_news, activity.course) %>