feat: allow SUPER_ADMIN role for admin access and update modal background opacity class.
This commit is contained in:
@@ -155,7 +155,7 @@ export default function AdminUsersPage() {
|
||||
|
||||
{/* Create Admin Modal */}
|
||||
{showCreate && (
|
||||
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
||||
<div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50">
|
||||
<div className="bg-white rounded-lg shadow-xl max-w-md w-full mx-4">
|
||||
<div className="px-6 py-4 border-b border-gray-200">
|
||||
<h3 className="text-lg font-semibold text-gray-900">Create Admin User</h3>
|
||||
|
||||
@@ -37,8 +37,8 @@ class AuthService {
|
||||
|
||||
const authData = response.data.data;
|
||||
|
||||
// Check if user is ADMIN
|
||||
if (authData.user.role !== 'ADMIN') {
|
||||
// Check if user is ADMIN or SUPER_ADMIN
|
||||
if (authData.user.role !== 'ADMIN' && authData.user.role !== 'SUPER_ADMIN') {
|
||||
throw new Error('Access denied. Admin privileges required.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user