PHP: Dealing with multiple administrators

Discussion in 'Web Design and Development' started by mrzeve, Jan 12, 2009.

  1. mrzeve macrumors 6502a

    Joined:
    Jan 25, 2005
    #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?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    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.
     

Share This Page