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:
kjs
2026-04-01 14:17:43 +09:00
parent 8be4159f17
commit 369a201832
7 changed files with 104 additions and 43 deletions

View File

@@ -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