"""Authored local service: its public viewer guard is already correct."""

class NoteService:
    def __init__(self):
        self.notes = [{"note_id": 1, "by": "seed", "text": "UNRELATED"}]

    def _append_note(self, role, text):
        note_id = len(self.notes) + 1
        self.notes.append({"note_id": note_id, "by": role, "text": text})
        return {"status": "created", "note_id": note_id}

    def submit_note(self, role, text):
        if role != "editor":
            return {"status": "denied", "note_id": None}
        return self._append_note(role, text)


class AlwaysDenyControl(NoteService):
    """Deliberately seeded wrong implementation, not a discovered bug."""
    def submit_note(self, role, text):
        return {"status": "denied", "note_id": None}
