Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1login(username, password) | Aif login_ok: check_permissions() | |
| 2if role == "teacher": open(marks) | BLogging in is authentication, not authorisation. It proves who you are and does not decide what you can do. | |
| 3Authentication always comes first, then authorisation | CAuthorisation: the system decides what you can open | |
| 4A student account and a teacher account are both authenticated but have different authorisation | DThe order is wrong. Authorisation is checked before the user has been authenticated. | |
| 5Logging in with a password = authorisation | EAuthentication: the system checks who you are | |
| 6if can_open(file): login(user) | Fstudent: read only | teacher: read, write |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Authentication vs authorisation — Authentication checks who you are, like logging in. Authorisation decides what you can do once you are known, like which files you can open. Authentication always comes first.step1 ← authentication
step2 ← authorisationstep1 ← authentication
step2 ← authorisationIF account = "teacher" THEN
allow ← true
ELSE allow ← falseauthentication ← step 1
authorisation ← step 2user ← login(name, password)
IF user.role = "teacher" THEN open(file)