Forum: Ruby on Rails Handling specific page editing permissions for members

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
143d37bc67b04ad4fdc69beddda48651?d=identicon&s=25 Tom Taylor (Guest)
on 2006-01-19 22:11
(Received via mailing list)
Hi all,

I'm building a custom content management system for a website in Rails.
What's the best way of restricting members to being able to edit
specific pages?

For example, a members might belong to a branch, along with many other
members (n:1 relationship). But I only want specific members to be able
to edit their branch page on the site, and no other branch pages.

Should I be making a join table with an extra attribute for permission
to edit? I understand that it's a bit messy in rails 1.0, and 1.1 will
have has_many :members, :through => branch_permissions, or something
like that. Is it worth waiting, or is there a better way?

Thanks!

Tom
This topic is locked and can not be replied to.