Feature 06: Use Cases for Admin User Invitation and Management¶
| Version | Date | Author | Change Description |
|---|---|---|---|
| 1.0 | 2025-09-04 | Senior Business Analyst | Initial Draft (Local User Creation) |
| 2.0 | 2025-09-11 | Senior Systems Analyst | Complete rewrite for Google SSO; replaced direct creation with an invitation model. |
1.0 User Stories¶
- US-11 (v2.0): As an administrator, I want to invite a new user and pre-assign their roles so that their permissions are correctly configured before they log in for the first time.
2.0 Use Case: Invite and Pre-provision a New User¶
This use case details the process of an administrator creating a placeholder "invited" record for a new user, allowing for proactive permission management.
- Use Case ID: UC-04
- User Story: US-11
- Actors:
- Administrator (with admin:user:invite permission)
- System
- Trigger: The administrator clicks the "Invite User" button on the "User Management" page.
2.1 Main Success Scenario¶
- The Administrator logs in and navigates to the "User Management" page.
- The Administrator clicks the "Invite User" button.
- The System displays the "Invite User" form, which includes fields for the user's email address and selectors for assigning roles and groups.
- The Administrator enters the new user's valid corporate email address.
- The Administrator selects one or more roles (e.g., "Editor Role") and/or groups (e.g., "Marketing Department") to assign to the user.
- The Administrator clicks "Save Invitation".
- The System validates the email address for correct format, corporate domain, and uniqueness (ensuring it does not already exist).
- The System creates a new user record in the database with the status set to Invited.
- The System associates the selected roles and groups with this new user record.
- The System displays a success message, "User has been successfully invited."
- The System redirects the Administrator back to the "User Management" list, which now includes the new user with an "Invited" status.
- Postconditions:
- A new user record exists in the database with a status of Invited.
- The specified roles and groups are linked to the new user record.
- The invited user can now complete their account activation by logging in via Google SSO.
2.2 Alternative & Exception Flows¶
- 2.2a: User Already Exists
- At step 4 of the main flow, the Administrator enters an email address that already belongs to a user with an Active or Invited status.
- The Administrator clicks "Save Invitation".
- The System detects the duplicate email and displays a server-side error message on the form, such as "A user with this email address already exists." The invitation is not created.
- 2.2b: Invalid Email Format or Domain
- At step 4 of the main flow, the Administrator enters an email with an invalid format (e.g., "invalid-email") or a non-corporate domain (e.g., "@gmail.com").
- The Administrator clicks "Save Invitation".
- The System detects the validation error and displays an inline message, such as "Please enter a valid corporate email address." The invitation is not created.
- 2.2c: Required Information is Missing
- At step 4 of the main flow, the Administrator leaves the email field blank.
- The Administrator clicks "Save Invitation".
- The System displays a client-side validation error: "Email address is required."
- 2.2d: Administrator Cancels the Invitation
- The Administrator opens the "Invite User" form and may or may not enter data.
- The Administrator clicks the "Cancel" button.
- The System closes the form, discards any entered data, and returns the Administrator to the user list. No user record is created.