Added more permission checks and interface for adding/saving new roles with permissions.