Permissions
QTO ERP uses dynamic permissions. The system does not rely on a fixed public role matrix. Access is calculated from a user’s direct permissions, permission groups, superuser status, employee hierarchy, team membership, and module/page configuration.
Permission model
Section titled “Permission model”Most records use standard action permissions:
| Permission type | Typical result |
|---|---|
view_* |
Allows viewing a page, list, detail, or record. |
add_* |
Allows creating records. |
change_* |
Allows editing records or using update-style actions. |
delete_* |
Allows deleting records where business rules also allow deletion. |
| Custom permissions | Control special actions such as exports, approvals, team assignment, campaign sending, or scoped access. |
Superusers bypass ordinary permission checks.
Module and page visibility
Section titled “Module and page visibility”When the application loads, it requests the current user’s permissions and groups. The frontend then filters modules, pages, and page sections by permission.
If a module, page, tab, button, or row action is missing, the most common reason is that the user does not have any of the required permissions for that item.
Button and row-action visibility
Section titled “Button and row-action visibility”Buttons and row actions are also permission-aware. Examples from implemented modules include:
- Create buttons require add permissions.
- Edit buttons require change permissions.
- Delete buttons require delete permissions and may still be blocked by business rules.
- Export actions may require export-specific permissions.
- Workflow actions may require module-specific permissions or record state.
Data scope
Section titled “Data scope”Permissions can control both what action is allowed and what data is visible.
| Scope behavior | Verified examples |
|---|---|
| Own records | Users can see their own account or activity logs when broader permissions are absent. |
| Team records | accounts.view_team_account and accounts.view_team_activitylog include the user and subordinates from the employee reporting hierarchy. |
| All records | accounts.view_all_account and accounts.view_all_activitylog allow full user/log visibility. |
| Team membership | Organization teams are visible to bypass users, while ordinary users see teams where they have active membership. |
| Team head scope | Team heads can view memberships for teams they lead. |
Direct permissions and group permissions
Section titled “Direct permissions and group permissions”A user can receive permissions in two ways:
- Through permission groups.
- Directly on the user account.
The current-user permissions response returns the combined effective permission list, grouped by app, plus assigned groups, staff flag, superuser flag, user ID, username, and designation ID.
Permission administration
Section titled “Permission administration”Permission administration supports:
- Viewing permissions by app.
- Viewing permissions by model.
- Viewing permissions by type: view, add, change, delete, custom.
- Viewing custom permissions and usage counts.
- Assigning permissions directly to users.
- Removing direct permissions from users.
- Replacing all direct permissions for a user.
- Viewing direct permissions for a user.
- Adding, removing, or replacing permissions on a group.
- Adding or removing users from a group.
Step-by-step: Diagnose missing access
Section titled “Step-by-step: Diagnose missing access”- Confirm the user is active.
- Check whether the user is a superuser.
- Review the user’s groups.
- Review the user’s direct permissions.
- Confirm the module/page/action requires one of those permissions.
- Check data scope: own, team, all, team membership, or workflow role.
- Ask the user to reload or sign in again after changes.
Important restrictions
Section titled “Important restrictions”- Authentication is required for protected areas.
- Inactive users cannot pass normal access checks.
- Object-level checks allow ownership patterns in some areas, but do not replace model permissions.
- Business rules can still block an action even when the button is visible.