Project

General

Profile

Actions

Bug #16

closed

Inconsistency between UI and API role assignment while creating admin

Added by Vivek Kumar about 1 month ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
03/13/2026
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

Description
While creating a new admin user via the UI, certain roles are not available for selection or cannot be assigned. However, when the same request is sent via the API, these roles can still be assigned successfully.
This creates an inconsistency between the frontend restrictions and backend behavior.
It is unclear whether these roles are intentionally restricted or if backend validation is missing.

Steps to Reproduce

  1. Navigate to: Admin Management → Add New Admin
  2. Observe the roles available in the role dropdown.
  3. Capture the API request generated when creating an admin: POST /api/admin/add-admin
  4. Modify the role parameter in the request body to another available role ID such as:
  • Viewer
  • Sub Admin
  • Client Admin
  1. Send the request.

Actual Result
The API successfully creates the admin user with the provided role.

Expected Result
The role assignment behavior should be consistent between the UI and backend API.
Either:

  • The UI should allow selecting these roles, or
  • The API should enforce the same role restrictions applied in the UI.

Additional Information
A request has been sent to Adhi sir to join the Postman team workspace so the APIs can be accessed and tested directly in Postman.


Files

BUG AKW0007.png (338 KB) BUG AKW0007.png Create Admin button doesn't work when Super Admin is selected as Admin Role. Vivek Kumar, 03/13/2026 10:06 AM
BUG AKW007.png (298 KB) BUG AKW007.png While the Super Admin can be created by modifying API call. Vivek Kumar, 03/13/2026 10:08 AM

Related issues 1 (0 open1 closed)

Related to Bug #26: API Allows Admin Creation Without Mandatory Fields (Name & Role) Bypassing UI ValidationClosed03/19/2026

Actions
Actions

Also available in: Atom PDF