1. Home
  2. Docs
  3. User Management Page Documentation

User Management Page Documentation

Overview of the User Management Page (/systemroles/admin/users – inferred URL)

The User Management page, titled “All Users,” presents a comprehensive list of users in your application. This page serves as a central hub for administrators to oversee user accounts and, critically, to manage their access privileges through role assignment.

In the SystemRoles package, roles are collections of specific permissions. Instead of assigning individual permissions to each user, which can quickly become unwieldy in larger applications, roles provide a streamlined way to manage access. For instance, a “Moderator” role might have permissions to “edit posts” and “delete comments,” while a “Subscriber” role might only have “view content.”

The primary purpose of the User Management page, beyond simply listing users, is to facilitate the assignment of these pre-defined roles to individual users. By selecting a user and assigning them a specific role (or changing their existing role), administrators can instantly grant or revoke a set of associated permissions. This powerful relationship between users, roles, and permissions ensures that:

  • Access Control is Granular: Users only have access to the functionalities and data they are authorized to interact with, minimizing security risks.
  • Management is Simplified: Instead of modifying permissions for each user individually, updates to a role automatically apply to all users assigned to that role.
  • Scalability is Enhanced: Adding new users or features becomes much simpler as you only need to assign an appropriate existing role or create a new role with the necessary permissions.
  • Auditability is Improved: It’s clear what level of access each user has by simply looking at their assigned role.

In essence, the User Management page is where the architectural design of roles and permissions translates into practical, real-world access control for your application’s users.

Key Features:

  • Users Table: This table displays essential information about each user and includes the following columns:
    • ID: The unique identifier for the user.
    • Name: The name of the user.
    • E-mail: The email address of the user.
    • Role: The role currently assigned to the user. This is crucial for understanding their access level.
    • Register Date: The date when the user registered.
    • Manage: This column contains actions related to managing the user. While the provided HTML doesn’t show specific icons, it’s expected to include functionality to edit user details or, more specifically, to assign roles (as indicated by the modal).

Modals

  1. Assign Permission Modal (#AssignPermissionModal):
    • Title: “Assign Permission
    • Purpose: This modal is used to assign a specific role to a user. It appears to be triggered from the “Manage” column in the Users Table.
    • Dynamic Heading: The modal includes a dynamic heading (<h3 class="text-primary fs-6 fw-bold " id="AssignPermissionModalHeading"></h3>) which is populated with text like “Assign Permission for [User Name]” via JavaScript (addTextToElement).
    • Fields:
      • Hidden user_id: An input (<input type="hidden" name="user_id" id="user_id_assign" value="0">) to pass the ID of the user whose role is being assigned. This value is set dynamically using JavaScript (addInputToElement).
      • Role Selection: A dropdown menu (<select class="form-control" id="role_id_assign" name="role_id" required>) allows you to select a role for the user. It includes a default “Select Role…” option and lists available roles (e.g., “SUPER ADMIN Role”). The role_id_assign is also dynamically set via JavaScript, likely indicating the currently assigned role or a placeholder.
    • Action: “Save Role” button to submit the selected role assignment.
    • Endpoint: https://app.systemroles.com/systemroles/admin/roles/user/assign (POST request).
Was this article helpful to you? No Yes

How can we help?