ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Public Blog plugin

Added by Patrick Naubert at 2011-06-09 04:21 pm

Hi, our site is Login-only, but we would like to make all our employees' Blogs public. I have installed the Blogs plugin, from Eric Davis' Github repo.
I can't seem to find a way to tell the Blog Plugin to permit views from unauthenticated users.

Anyone suceeded at this already ?


Replies (4)

RE: Public Blog plugin - Added by Eric Davis at 2011-06-10 03:56 pm

I think you can give the "View Blogs" permission to the Anonymous role. That should let them read the blogs.

P.S. The plugin wasn't development by me, I uploaded the last tarball of it I could find and fixed a few bugs in it.

Eric Davis

RE: Public Blog plugin - Added by Patrick Naubert at 2011-06-10 04:59 pm

That's what I thought too, but alas, no. If I am not loged in, I get redirected to the login page, even when I set View Blogs to Anonymous.

RE: Public Blog plugin - Added by Eric Davis at 2011-06-10 05:52 pm

Might be a problem with User#allowed_to?. I've seen that method not like accounts that have no projects, even if the Anonymous Role has permission. If you could debug this and see if it's a problem in the plugin or the core code, maybe we could fix it once and for all.

Eric Davis

RE: Public Blog plugin - Added by Patrick Naubert at 2011-06-17 02:58 pm

Found the solution:

root@redmine:/var/www/rails_apps/redmine_test/vendor/plugins/redmine_blogs/app/controllers# git diff
diff --git a/app/controllers/blogs_controller.rb b/app/controllers/blogs_controller.rb
index ce51515..3f8b945 100644
--- a/app/controllers/blogs_controller.rb
+++ b/app/controllers/blogs_controller.rb
@@ -4,6 +4,7 @@ class BlogsController < ApplicationController
   helper :attachments
   include AttachmentsHelper

+  skip_before_filter :check_if_login_required, :only => [:index, :show, :show_by_tag, :add_comment ]
   before_filter :find_blog, :except => [:new, :index, :preview, :show_by_tag, :get_tag_list]
   before_filter :find_user, :only => [:index]
   before_filter :authorize_global

(1-4/4)