NOTE: This feature is only available in the DarkRP SVN Revision 496 or later! You can create your door groups, like the CP/Mayor only doors, for your own classes as of this revision.
You do this in DarkRP/gamemode/shared.lua, at the bottom of the file, above the custom agendas and below the custom jobs..
Here's how you create your own:
<lua> AddDoorGroup("NAME OF THE GROUP HERE, you see this when looking at a door", Team1, Team2, team3, team4, etc.) </lua>
This will create a door group, you can assign doors to groups in-game by pressing reload with your keys whilst looking at a door as a superadmin, or pressing F2 whilst looking at a door.
Here's an example:
<lua> AddDoorGroup("CPs and Mayor Only", TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR) </lua>
If you assigned a door to this door group, the door would be titled "CPs and Mayor Only", and only TEAM_CHIEF, TEAM_POLICE and TEAM_MAYOR would be able to lock/unlock it.