Skip to main content

Submission: Whose record is this?

Name / student identifier:

Before the repair​

  1. Who was the demonstration user?
  2. What happened when you requested 101? What happened for 102?
  3. Why is the second result incorrect under the lesson's ownership rule?

Your repair​

Attach your edited authorize.mjs. Explain what the comparison checks. Confirm you saved and restarted the server.

Verification​

RequestExpected resultYour observed status and result
101Allowed
102Denied without Sam's record
999Not found
abcInvalid request

Paste the output of node checks.mjs here. If you could not run it, explain what stopped you; do not claim unperformed checks passed.

Explain​

  1. Why does knowing a record ID not give permission to read it?
  2. Why is hiding the request button insufficient?
  3. Why must we test Alex's access as well as Sam's denial?
  4. Which part was supplied instead of implemented: authentication or authorization?

Screenshot preview