Draw a flowchart that shows how a computer system checks user login and permissions. Start from the user entering username and password, then verify credentials, and finally check if the user has permission to access a file. Show the possible outcomes: access granted or access denied.
User accounts and permissions in Intro to Computing - Draw & Build Visually
Start learning this pattern below
Jump into concepts and practice - no test required
or
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Draw This - beginner
Grading Criteria
Solution
+---------------------+
| Start |
+----------+----------+
|
v
+---------------------+
| Input username & |
| password |
+----------+----------+
|
v
+---------------------+
| Check credentials |
+----------+----------+
|
+------+------+
| |
Yes No
| |
v v
+-------------+ +----------------+
| Check user | | Display error: |
| permissions | | Invalid login |
+------+------+ +-------+--------+
| |
+----+----+ |
| | |
Yes No |
| | |
v v v
+-----------+ +----------------+
| Access | | Display error: |
| granted | | Access denied |
+-----------+ +----------------+
| |
+-------+-------+
|
v
+----+----+
| End |
+---------+This flowchart starts with the user entering their username and password.
First, the system checks if the credentials are correct. If not, it shows an error message 'Invalid login' and ends.
If the credentials are correct, the system then checks if the user has permission to access the requested file.
If the user has permission, access is granted and the process ends.
If the user does not have permission, an 'Access denied' message is shown and the process ends.
Variations - 2 Challenges
[intermediate] Draw a flowchart for a system that allows three login attempts before locking the user out. Include checking credentials and permissions as before.
[advanced] Draw a flowchart for a system that supports three user roles: Admin, Editor, and Viewer. After login, check the role and show different access permissions for each role.
Practice
1. What is the main purpose of a user account on a computer?
easy
Solution
Step 1: Understand the role of user accounts
User accounts are created to recognize and separate different users on the same computer.Step 2: Identify the correct purpose
Among the options, only identifying the user matches the main purpose of user accounts.Final Answer:
To identify who is using the computer -> Option CQuick Check:
User account = Identify user [OK]
Hint: User accounts are about who, not how fast [OK]
Common Mistakes:
- Confusing user accounts with hardware speed
- Thinking user accounts control internet speed
- Assuming user accounts install software automatically
2. Which of the following is the correct way to represent a permission that allows a user to read and write files?
easy
Solution
Step 1: Understand permission symbols
In permissions, 'r' means read, 'w' means write, and 'x' means execute. A dash '-' means no permission.Step 2: Match read and write permissions
Read and write together are represented as 'rw-'. 'rwx' includes execute, which is not asked.Final Answer:
rw- -> Option DQuick Check:
Read + Write = rw- [OK]
Hint: r=read, w=write, x=execute; dash means no permission [OK]
Common Mistakes:
- Including execute permission when not needed
- Using only 'r' for read and write
- Confusing dashes with permission letters
3. Consider this scenario: A file has permissions set to
r-- for a user. What can the user do with this file?medium
Solution
Step 1: Interpret the permission string 'r--'
'r' means read permission is granted; '-' means no write or execute permission.Step 2: Determine allowed actions
With only read permission, the user can open and view the file but cannot change or run it.Final Answer:
Only read the file -> Option AQuick Check:
r-- means read only [OK]
Hint: r-- means read only, no write or execute [OK]
Common Mistakes:
- Assuming write permission is included
- Thinking execute permission is granted
- Confusing delete with permissions shown
4. A user tries to edit a file but gets a 'Permission Denied' error. Which of the following is the most likely cause?
medium
Solution
Step 1: Understand 'Permission Denied' meaning
This error means the user lacks the rights to perform the action on the file.Step 2: Identify permission issue cause
If the file is read-only, the user cannot edit it, causing the error. Other options do not relate to permissions.Final Answer:
The file has read-only permission for the user -> Option BQuick Check:
Permission Denied = insufficient rights [OK]
Hint: Permission Denied usually means no write access [OK]
Common Mistakes:
- Blaming file corruption for permission errors
- Assuming user login status causes permission errors
- Confusing computer power state with permissions
5. An administrator wants to give a user permission to read and execute files but not modify them. Which permission string should be assigned?
hard
Solution
Step 1: Understand required permissions
The user needs read (r) and execute (x) permissions but no write (w) permission.Step 2: Match permission string
"r-x" means read and execute allowed, write denied. Other options either allow write or deny read.Final Answer:
r-x -> Option AQuick Check:
Read + Execute, no write = r-x [OK]
Hint: r-x means read and execute, no write [OK]
Common Mistakes:
- Choosing rwx which allows write
- Selecting rw- which lacks execute
- Picking --x which lacks read
