# Excluding add/remove options but leaving the edit as-is

**URL:** <https://www.ruby-forum.com/t/excluding-add-remove-options-but-leaving-the-edit-as-is/130836>\
**Category:** Rails\
**Created:** [March 3, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/excluding-add-remove-options-but-leaving-the-edit-as-is/130836 "2008-03-03T20:01:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![capslock118](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@capslock118](https://www.ruby-forum.com/u/capslock118)\
**Post date:** [March 3, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/excluding-add-remove-options-but-leaving-the-edit-as-is/130836/1 "2008-03-03T20:01:34Z")

</div>

Hello,

I am creating the admin section for a client using active-scaffold. I  
think keeping AS on the side, what I would like to do is allow the admin  
to add/edit/delete certain pages - driven by the pages controller while  
only allowing the edit option for other pages.

Examples would be:  
-I would like a home page that the admin can edit but not delete (for  
obvious resons )  
-I would like the admin to add and edit any category that they add, but  
disallow them from deleting certain essentials - such as products  
category, services category (non essentials would be logged in user  
categories)  
-I would like the admin to add/edit/delete users they add but not remove  
users that are essential to the sites operation. For instance my current  
setup displays content to the main site that is owned by the ‘public’  
user and also private data if the person who has rights to it is logged  
on.

I am imagining I will need to have a field in the database for each  
entity that I do not wanted edited or removed - like a ‘no\_delete’  
field?

What are your thoughts on this? Do I make sense?

---

<div class="post-metadata">

**Author:** ![capslock118](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@capslock118](https://www.ruby-forum.com/u/capslock118)\
**Post date:** [March 3, 2008, 8:33pm UTC](https://www.ruby-forum.com/t/excluding-add-remove-options-but-leaving-the-edit-as-is/130836/2 "2008-03-03T20:33:24Z")

</div>

Joel S. wrote:

> -I would like a home page that the admin can edit but not delete (for  
> obvious resons )  
> -I would like the admin to add and edit any category that they add, but  
> disallow them from deleting certain essentials - such as products  
> category, services category (non essentials would be logged in user  
> categories)  
> -I would like the admin to add/edit/delete users they add but not remove  
> users that are essential to the sites operation. For instance my current  
> setup displays content to the main site that is owned by the ‘public’  
> user and also private data if the person who has rights to it is logged  
> on.

It sounds like you want some sort of role based access control.

Have a look at Goldberg for one such mechanism:

[http://goldberg.240gl.org/](http://goldberg.240gl.org/)

There are others too.
