Hello Will,
If I've understood correctly you want to:
- Everyone needs to login first, but they shouldn't all be editors.
- The admin role would be the people who can edit.
#2 does rely on trusting people who can edit not to destroy the instance but would be far simpler to get up and running.
#1 would be involve the the EditorRequiredAttribute and the AuthorizationProvider class. The way it works is:
- You go to edit or create a new page with an MVC Action
- The MVC action is decorated with EditorRequiredAttribute
- The attribute uses an AuthorizationProvider that is injected into it by the IoC container (Structuremap) and checks if you're an editor, or an admin
So I think the easiest solution would be to fork Roadkill (make sure you use v2.0 tag, master isn't version 2.0) write your own IAuthorizationProvider, and then set that as the default:
IAuthorizationProvider is just a role-checker, but follows the naming convention Microsoft use for their roles-system (authorization isn't the same as authentication). You could create some new attributes by copying and pasting the EditorRequiredAttribute if you wanted to create new roles, just bare in mind the next version of Roadkill that I'm aiming to release next year might make upgrading a lot of hard work for you.
Hope that helps,
Chris