Authorization lives on the server
Hiding a button improves the interface but does not protect the resource. Download, review and export endpoints must verify ownership and college scope independently.
LOCAL ENGINEERING CASE / 01
Keeping ownership, versions and review decisions consistent across file search, downloads and exports.
01 / PROBLEM & DESIGN
Teaching materials belong to both an individual uploader and a college. Uploading a file with the same name should preserve its version relationship. Reviewers need pending materials and rejection reasons, while every route to a file needs the same access boundary.
| Stage | Implementation observed in source |
|---|---|
| Upload | Per-file progress; server checks empty input, size, extension and category permissions. |
| Versions | Active same-name files from the same uploader increment their version number and link to the previous version. |
| Access | Teachers view their own files; administrators and super administrators query files within their college. |
| Review | Management roles approve or reject. Rejection requires a reason; reviewer and time are recorded. |
| Export & audit | Lists, CSV and print reuse the query scope. Upload, review, download, export, preview and logical deletion write operation logs. |
02 / ENGINEERING DECISIONS
Hiding a button improves the interface but does not protect the resource. Download, review and export endpoints must verify ownership and college scope independently.
Version history expresses content evolution; review state expresses whether the current material meets requirements. They require separate fields and transitions.
The implementation removes a newly written file if metadata insertion fails. Interruptions, logging failures and orphan-file cleanup still need explicit recovery strategies.
03 / SYNTHETIC POLICY SKETCH
Synthetic resources and simplified client-side policy. This is not the original system or an application screenshot.
| File | Owner | Version | Review state |
|---|
04 / EVIDENCE & NEXT STEPS