Implement SUPER_ADMIN permission checks in user management
- Added validation to ensure that only existing SUPER_ADMIN users can grant or modify SUPER_ADMIN permissions. - Updated the user management page to reflect that both SUPER_ADMIN and COMPANY_ADMIN can access the user permissions, while COMPANY_ADMIN cannot grant SUPER_ADMIN rights. - Enhanced the user authorization modal to prevent COMPANY_ADMIN from changing SUPER_ADMIN permissions, ensuring proper access control. These changes improve the security and integrity of user role management within the application.
This commit is contained in:
@@ -459,6 +459,7 @@ export function UserFormModal({ isOpen, onClose, onSuccess, editingUser }: UserF
|
||||
value={formData.userId}
|
||||
onChange={(e) => handleInputChange("userId", e.target.value)}
|
||||
onKeyDown={handleKeyDown}
|
||||
autoComplete="off"
|
||||
className="flex-1"
|
||||
/>
|
||||
<Button
|
||||
@@ -511,6 +512,7 @@ export function UserFormModal({ isOpen, onClose, onSuccess, editingUser }: UserF
|
||||
value={formData.userPassword}
|
||||
onChange={(e) => handleInputChange("userPassword", e.target.value)}
|
||||
onKeyDown={handleKeyDown}
|
||||
autoComplete="new-password"
|
||||
className="pr-10"
|
||||
/>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user