← Years 9–10 Digital Systems

Role-based access control

A way to manage access by giving permissions to roles, like student, teacher or admin, then assigning each user a role. Changing a user's role changes what they can access.

Understanding Role-based access control in Years 9–10 Digital Systems

What it does: Moving Sam from the student role to the admin role immediately gives Sam the admin permissions, with no need to edit them one by one. The permission (read) is set on the student role. Every student gets it because they have that role. RBAC attaches permissions to roles. Users then get access by being assigned a role. Only that user's role assignment is removed. The teacher role stays so other teachers keep their access. Many students share the student role, which makes access easier to manage.

Common mistakes: Mia is a student, so she should be assigned the student role. Assigning her to teacher would give her write access she should not have. The teacher role must include write so that Mr Lee can read and write. It should be role teacher = [read, write].

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 13–24) and word search (Modules 13–40).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
In role-based access control (RBAC), where are permissions first given?
To roles, like student, teacher or adminTo each user one at a time
Matches
permission: write -> user: mia permission: write -> user: leo permission: write -> user: zoe
↓
Permissions are given to each user one at a time instead of to a role. This is slow and easy to get wrong when many users need the same access.
Applying
Meanings
Term
Role-based access control (RBAC)
Meaning
A way to manage access by giving permissions to roles, like student, teacher or admin, then assigning each user a role. Changing a user's role changes what they can access.
Practice
ROLE student: read shared_drive
Testing
Gaps
teacher = [read, write]
Check Answer
Spots
2role teacher = [read, write]
3assign Mia to teacher

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Hermit Crab' badge — Definition Collector, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. In role-based access control (RBAC), where are permissions first given?
A. To roles, like student, teacher or admin ✓
B. To each user one at a time
RBAC attaches permissions to roles. Users then get access by being assigned a role.
2. On a school network using RBAC, how does a new student get access to the student files?
A. The admin sets up a new list of permissions just for them
B. They are assigned the student role ✓
The student role already has the right permissions, so assigning the role is all that is needed.
3. A student is chosen as a library helper and moved from the student role to the librarian role. What happens to their access?
A. It changes to match the librarian role ✓
B. It stays the same as the student role
Changing a user's role changes what they can access, because the permissions belong to the role.
4. Which of these is an example of a role in a school network?
A. Teacher ✓
B. Password123
A role is a job or group, like student, teacher or admin. A password is a credential, not a role.
5. A teacher leaves the school. What is the RBAC way to remove their access?
A. Delete the teacher role for everyone
B. Remove their assignment to the teacher role ✓
Only that user's role assignment is removed. The teacher role stays so other teachers keep their access.

Match the Pairs

assign(user: mia, role: student) → Gives the user Mia the student role, so she gets all the access that the student role has
role: teacher -> read, write → Defines the permissions that belong to the teacher role, so anyone with this role can read and write
Changing a user's role changes what they can access → assign(user: sam, role: admin)
Permissions are given to a role, not directly to each user on a school network → role: student -> read
permission: write -> user: mia permission: write -> user: leo permission: write -> user: zoe → Permissions are given to each user one at a time instead of to a role. This is slow and easy to get wrong when many users need the same access.
assign(user: mia, role: admin) // Mia is a student → Mia is given the admin role even though she is a student, so she gets far more access than she needs.

Key Term

Role-based access control (RBAC)
A way to manage access by giving permissions to roles, like student, teacher or admin, then assigning each user a role. Changing a user's role changes what they can access.

Fill in the Blanks

1. role teacher = [read, write] role student = [read]
Hint: Type the keyword that defines a named set of permissions.
2. role student = [read] assign Mia to student
Hint: Type the keyword that gives a user a role.
3. assign Sam to student assign Sam to teacher Sam can now read and write
Hint: Type the role that gives both read and write access.
4. if user.role == "admin": allow(execute)
Hint: Type the property that stores which role a user has.
5. role admin = [read, write, execute] assign Tech_Kim to admin
Hint: Type the role that has every permission.

Spot the Error

Question 1
A role student = [read]
B role teacher = [read, write]
C assign Mia to teacher
D Mia can: read
Line C — Mia is a student, so she should be assigned the student role. Assigning her to teacher would give her write access she should not have.
Question 2
A assign Mr Lee to teacher
B role teacher = [read]
C Mr Lee can: read, write
Line B — The teacher role must include write so that Mr Lee can read and write. It should be role teacher = [read, write].
Question 3
A role Ali = [read]
B assign Ali to student
C assign Bo to student
Line A — In RBAC a role is a group such as student, not a single person. The student role is never defined, so it should be role student = [read].
Question 4
A assign Zoe to student
B grant write to Zoe
C Zoe can: read, write
Line B — RBAC gives permissions to roles, not to individual users. To give Zoe write access, change her role to teacher.
Question 5
A role student = [read]
B role teacher = [read, write]
C assign Jo to student
D change Jo role to student
E Jo can: read, write
Line D — Jo is already a student, so this change does nothing. To give Jo read and write access, her role must change to teacher: change Jo role to teacher.

Student with a class code? Join your class →