Prechádzať zdrojové kódy

[web] Hide privilege matrix tab in CE/SP (#34339)

The privilege matrix is only available in saas.

GitOrigin-RevId: 72156e82d5039bc622e0119e07d2b4c5b9fdc10d
Miguel Serrano 2 mesiacov pred
rodič
commit
a4d682719b
1 zmenil súbory, kde vykonal 34 pridanie a 34 odobranie
  1. 34 34
      services/web/app/views/admin/index.pug

+ 34 - 34
services/web/app/views/admin/index.pug

@@ -16,8 +16,8 @@ block content
 										+bookmarkable-tabset-header('system-messages', 'System Messages', true)
 										+bookmarkable-tabset-header('open-sockets', 'Open Sockets')
 										+bookmarkable-tabset-header('open-close-editor', 'Open/Close Editor')
-										+bookmarkable-tabset-header('privileges-matrix', 'Privileges Matrix')
 										if hasFeature('saas')
+											+bookmarkable-tabset-header('privileges-matrix', 'Privileges Matrix')
 											+bookmarkable-tabset-header('tpds', 'TPDS/Dropbox Management')
 											+bookmarkable-tabset-header('debug-projects', 'Debug Projects')
 
@@ -73,42 +73,42 @@ block content
 													button.btn.btn-danger(type='submit') Reopen Editor
 												p.small Will reopen the editor after closing.
 
-									.tab-pane(role='tabpanel' id='privileges-matrix')
-										p This matrix shows the access levels for different admin roles across various user management privileges. The matrix is automatically generated from the code-defined roles and capabilities.
-										if hasFeature('saas') && privilegesMatrix
-											.privileges-matrix-container
-												table.table.table-bordered.table-striped.privileges-matrix-table
-													thead
-														tr
-															th Webpage and privilege
-															th(colspan=privilegesMatrix.roles.length) Access Level Needed For Team
-														tr
-															th
-															each role in privilegesMatrix.roles
-																th= role.displayName
-													tbody
-														- let currentSection = null
-														each row in privilegesMatrix.privileges
-															- const privilege = row.privilege
-															if currentSection !== privilege.section
-																- currentSection = privilege.section
-																tr.section-header
-																	td(colspan=privilegesMatrix.roles.length + 1)
-																		strong= privilege.section
+									if hasFeature('saas')
+										.tab-pane(role='tabpanel' id='privileges-matrix')
+											p This matrix shows the access levels for different admin roles across various user management privileges. The matrix is automatically generated from the code-defined roles and capabilities.
+											if privilegesMatrix
+												.privileges-matrix-container
+													table.table.table-bordered.table-striped.privileges-matrix-table
+														thead
 															tr
-																td.privilege-label= privilege.label
+																th Webpage and privilege
+																th(colspan=privilegesMatrix.roles.length) Access Level Needed For Team
+															tr
+																th
 																each role in privilegesMatrix.roles
-																	- const accessLevel = row.access[role.id]
-																	td.access-cell(class=`access-${accessLevel}`)
-																		span.access-badge(class=`badge-${accessLevel}`)
-																			if accessLevel === 'yes'
-																				| Yes
-																			else
-																				| No
-										else
-											p The privileges matrix is not available in this environment.
+																	th= role.displayName
+														tbody
+															- let currentSection = null
+															each row in privilegesMatrix.privileges
+																- const privilege = row.privilege
+																if currentSection !== privilege.section
+																	- currentSection = privilege.section
+																	tr.section-header
+																		td(colspan=privilegesMatrix.roles.length + 1)
+																			strong= privilege.section
+																tr
+																	td.privilege-label= privilege.label
+																	each role in privilegesMatrix.roles
+																		- const accessLevel = row.access[role.id]
+																		td.access-cell(class=`access-${accessLevel}`)
+																			span.access-badge(class=`badge-${accessLevel}`)
+																				if accessLevel === 'yes'
+																					| Yes
+																				else
+																					| No
+											else
+												p The privileges matrix is not available in this environment.
 
-									if hasFeature('saas')
 										.tab-pane(role='tabpanel' id='tpds')
 											h3 Flush project to TPDS
 											.row