0017 — Grading, audit, authorship and reviewer access controls
A recorded institutional decision, with reasoning and result.
- Authority rank
- 5
- Version
- v1.0
- Adopted
- unrecorded
- Held by
- Stewardship Office
- System
- SYS-10
Source · docs/codices/DECISIONS/0017-grading-audit-and-authorship-access-controls.md · registered by rule
- Date: 2026-09-18
- Status: decided
- Governs: STD-S (security), STD-D (data), Codex 11 (institutional systems), Codex 5 (data model)
- Owner: Technology (DIV-05)
- Review date: 2027-09-18
Decision
Least-privilege pass completed after the launch security review (DECISION-0016). Four further defects were found by scan and corrected:
- 1Self-grading.
lrn_assessment_attemptsallowed a learner to setscore,passed,grader_id,feedbackandresolved_aton their own attempt. ASECURITY DEFINERtrigger now rejects any write to those columns unless the actor holdsinstructororadmin. Learners may still start and submit attempts. A credential that a learner can award themselves is not a credential (Codex 5; STD-S).
- 1Audit-log forgery.
aud_audit_eventsandaud_access_eventsaccepted direct inserts from any signed-in user providedactor_idmatched. Client insert rights are withdrawn; the two legitimate writers (src/lib/leads/admin.server.ts,src/lib/academy-faculty.server.ts) now write through the server's privileged client after their own role checks. The record of what happened cannot be authored by the party it describes.
- 1Reviewer over-reach. The
submissionsreviewer policy comparedpeer_reviews.submission_idtopeer_reviews.id, an uncorrelated condition that let anyone assigned as a reviewer of any submission read every submission in the table. Now correlated to the queried row.
- 1Authorship exposure.
kno_authorsexposedperson_idand affiliation for any active row. Now visible publicly only when the author is attached to a published, public knowledge item and the person has explicitly chosen a public profile. Absence of a stated preference is read as private (Codex 11: consent is affirmative, never assumed).
Retained by intent
The permission-resolution functions (has_role, has_permission, can_*, is_academy_faculty_for_course) remain executable by signed-in users. Row-level policies invoke them on every read; withdrawing execution would lock members out of their own records. The scanner flags the pattern, not a fault.
Consequences
No public surface, no navigation, no content and no terminology changed. Grading now requires faculty standing, which is the intended institutional workflow.