El Dorado

A full-stack community web application written in Ruby/Rails
Blog Privs « El Dorado « almost effortless
 
Tue, 05 Aug 2008, 9:49pm #1
gnovena
Member
Registered: Jan, 2008
Last visit: Fri, 26 Sep 2008
Posts: 15

Trevor, it seems that by default, any user can post a blog entry. Is there a quick way to say only users A, B and C can post blog articles?

Offline
Tue, 05 Aug 2008, 10:51pm #2
Trevor
Administrator
Wait-ill-fix-it
Registered: Sep, 2005
Last visit: 4 hours ago
Posts: 240

The trick is to use the "Admin-only create actions" option in the admin interface (/admin on your site). If you put "articles" in there, then only admins would be able to create new articles. If you put "articles headers" then that would apply to both the blog and the headers. If you're not interested in using a particular section (e.g. headers) then you can also hide the tab very easily with a theme. Here's an example that hides the blog tab and makes a custom login background:

http://newathens.org/themes/newathens.css

Offline
Tue, 05 Aug 2008, 11:15pm #3
gnovena
Member
Registered: Jan, 2008
Last visit: Fri, 26 Sep 2008
Posts: 15

oh man, i love it! works like a champ.

lets say i want 3 or 4 users to be able to post blog articles..could i use that admin field to grant privs to them?

Offline
Wed, 06 Aug 2008, 8:30am #4
Trevor
Administrator
Wait-ill-fix-it
Registered: Sep, 2005
Last visit: 4 hours ago
Posts: 240

Given the way things work now, there's no "user roles" or a very robust permissions system to speak of. So, you'd have to use that setting, and then make anyone you wanted to have the ability to blog into a admin. You can do that from their user page (e.g. /users/1). Of course, this isn't ideal, but I'm hoping it's good enough for the time being.

Offline