larxius commited on
Commit
b2c523a
·
verified ·
1 Parent(s): c86d8a7

Update frontend/src/pages/SuperAdminPanel.jsx

Browse files
frontend/src/pages/SuperAdminPanel.jsx CHANGED
@@ -823,15 +823,25 @@ const SuperAdminPanel = () => {
823
  };
824
 
825
  // Member CRUD
826
- const MEMBER_ROLE_OPTIONS = [
827
- { label: 'Admin', value: 'admin' },
828
- { label: 'SOC Analyst', value: 'soc_analyst' },
829
- { label: 'Organization Admin', value: 'org_admin' },
830
- { label: 'Executive User', value: 'executive_user' },
831
- { label: 'Super Admin', value: 'super_admin' },
832
- { label: 'Support Engineer', value: 'support_engineer' },
833
- { label: 'Read Only', value: 'read_only' }
834
- ];
 
 
 
 
 
 
 
 
 
 
835
 
836
  const handleAddMember = () => {
837
  const orgOptions = [
@@ -1522,7 +1532,7 @@ const SuperAdminPanel = () => {
1522
  <option value="soc_analyst">SOC Analyst</option>
1523
  <option value="org_admin">Organization Admin</option>
1524
  <option value="executive_user">Executive User</option>
1525
- <option value="super_admin">Super Admin</option>
1526
  <option value="support_engineer">Support Engineer</option>
1527
  <option value="read_only">Read Only</option>
1528
  </select>
 
823
  };
824
 
825
  // Member CRUD
826
+ const MEMBER_ROLE_OPTIONS = (user?.role === 'admin'
827
+ ? [
828
+ { label: 'Admin', value: 'admin' },
829
+ { label: 'SOC Analyst', value: 'soc_analyst' },
830
+ { label: 'Organization Admin', value: 'org_admin' },
831
+ { label: 'Executive User', value: 'executive_user' },
832
+ { label: 'Support Engineer', value: 'support_engineer' },
833
+ { label: 'Read Only', value: 'read_only' }
834
+ ]
835
+ : [
836
+ { label: 'Admin', value: 'admin' },
837
+ { label: 'SOC Analyst', value: 'soc_analyst' },
838
+ { label: 'Organization Admin', value: 'org_admin' },
839
+ { label: 'Executive User', value: 'executive_user' },
840
+ { label: 'Super Admin', value: 'super_admin' },
841
+ { label: 'Support Engineer', value: 'support_engineer' },
842
+ { label: 'Read Only', value: 'read_only' }
843
+ ]
844
+ );
845
 
846
  const handleAddMember = () => {
847
  const orgOptions = [
 
1532
  <option value="soc_analyst">SOC Analyst</option>
1533
  <option value="org_admin">Organization Admin</option>
1534
  <option value="executive_user">Executive User</option>
1535
+ {user?.role !== 'admin' && <option value="super_admin">Super Admin</option>}
1536
  <option value="support_engineer">Support Engineer</option>
1537
  <option value="read_only">Read Only</option>
1538
  </select>