views:

61

answers:

3

I have a system where users insert many types of things ("incidences") and all of them have to be approved by an admin. Which pattern will be useful for this case? Maybe validation is not the word for this.

Update: The problem is that the db where the data resides can't be changed. All the moderation things will be done in another db and when the data is accepted then the original db is updated. So I suppose I will have to duplicate tables and make a parent table wich says if it's an insert, update or delete.

+2  A: 

I think the term you are looking for is "moderation", but this is not really a design pattern.

Unless you go into the details about your architecture, that's all I think we can provide.

Fragsworth
+1  A: 

Define a field for any "incidence", something like IsApproved, set it to false whenever an incidence is submitted.

The admin will go through each of them and approve them by setting IsApproved to true;

The system will only display publicly submissions where IsApproved = true;

That's pretty much it.

Developer Art
You're right, there's nothing more to say with that details, sorry for that. Now it's updated.
polyphony
A: 

I think the design pattern which applies in this sceanrio is Mediator. That probably doesn't get you very far, as I supsect you are after some more specific implementation advice. The Wikipedia entry offers some launch points which you may find useful.

APC