Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mrzeve

macrumors 6502a
Original poster
Jan 25, 2005
617
1
Hey guys,

So I have a content management system that I have developed.

Users, who are not administrators, submit stories.

They are then sent to a pending database.

An administrator then gets to view, edit, and then submit those stories.

However, what if I want to give multiple users administrator privileges? The dilemma in my mind is, what if two administrators open the same story at the same time, and are both editing it. Then there will be two altering submissions of the same story.

What is an effective way to prevent something like this while having multiple moderators/admins.

Anyone deal with something like this in the past?
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
A lock of course. Add a column to the stories table for a lock and it becomes true when an admin accesses it and returns to false when it's "released." An alternative is that each story can be assigned (or accepted) to an admin, then other admins can tell which ones have been taken on so far. Each way would require some edits to the DB, but should be minimal.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.