@power-maverick/tool-security-role-comparator 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/dist/icons/securityRoleComparator.svg +10 -0
- package/dist/index.css +1 -0
- package/dist/index.html +13 -0
- package/dist/index.js +43 -0
- package/npm-shrinkwrap.json +3594 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Security Role Comparator
|
|
2
|
+
|
|
3
|
+
A [PPTB](https://github.com/Power-Maverick/PowerPlatformToolBox) tool that lets you compare one security role against up to **5** other roles in the same Dataverse environment—side by side, privilege by privilege.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Side-by-side comparison** – Select a base role and up to 5 comparison roles
|
|
8
|
+
- **Depth visualization** – Four filled/empty dots represent None → User → Business Unit → Parent-Child BU → Organization
|
|
9
|
+
- **Difference highlighting** – Cells that differ from the base role are highlighted in amber
|
|
10
|
+
- **"Differences only" filter** – Hide rows where all compared roles share the same privilege depth
|
|
11
|
+
- **Entity search** – Filter by entity name or operation (Create, Read, Write, Delete, …)
|
|
12
|
+
- **Dark mode** – Follows the PPTB host theme automatically
|
|
13
|
+
|
|
14
|
+
## Privilege Depth Legend
|
|
15
|
+
|
|
16
|
+
| Dots | Level | Description |
|
|
17
|
+
|------|-------|-------------|
|
|
18
|
+
| ○○○○ | None | Privilege not granted |
|
|
19
|
+
| ●○○○ | User | Basic (own records) |
|
|
20
|
+
| ●●○○ | Business Unit | Local (business unit records) |
|
|
21
|
+
| ●●●○ | Parent-Child BU | Deep (business unit + child BU records) |
|
|
22
|
+
| ●●●● | Organization | Global (all records) |
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
1. Connect to a Dataverse environment in PPTB.
|
|
27
|
+
2. Open **Security Role Comparator**.
|
|
28
|
+
3. Select the **Base Role** from the first dropdown.
|
|
29
|
+
4. Choose one or more **Compare** roles (up to 5 total).
|
|
30
|
+
5. Click **Compare**.
|
|
31
|
+
6. Use the search box or *Differences only* checkbox to focus on specific areas.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor">
|
|
2
|
+
<rect width="32" height="32" rx="6" fill="#6366f1" />
|
|
3
|
+
<!-- Shield outline -->
|
|
4
|
+
<path d="M16 5 L26 9 L26 17 C26 22.5 21.5 27 16 29 C10.5 27 6 22.5 6 17 L6 9 Z" fill="white" fill-opacity="0.15"
|
|
5
|
+
stroke="white" stroke-width="1.5" stroke-linejoin="round" />
|
|
6
|
+
<!-- Comparison lines -->
|
|
7
|
+
<line x1="11" y1="14" x2="21" y2="14" stroke="white" stroke-width="1.5" stroke-linecap="round" />
|
|
8
|
+
<line x1="11" y1="17" x2="21" y2="17" stroke="white" stroke-width="1.5" stroke-linecap="round" />
|
|
9
|
+
<line x1="11" y1="20" x2="17" y2="20" stroke="white" stroke-width="1.5" stroke-linecap="round" />
|
|
10
|
+
</svg>
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--depth-none: #d1d5db;--depth-basic: #60a5fa;--depth-local: #34d399;--depth-deep: #f59e0b;--depth-global: #6366f1;--dot-empty: #e5e7eb;--bg: #ffffff;--bg-subtle: #f9fafb;--bg-row-even: #ffffff;--bg-row-odd: #f9fafb;--bg-base-col: #eff6ff;--bg-diff: #fef9c3;--border: #e5e7eb;--text: #111827;--text-muted: #6b7280;--shadow: 0 1px 3px rgba(0, 0, 0, .06);--radius: 6px;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}body.dark-theme{--depth-none: #4b5563;--depth-basic: #3b82f6;--depth-local: #10b981;--depth-deep: #f59e0b;--depth-global: #818cf8;--dot-empty: #374151;--bg: #1f2937;--bg-subtle: #111827;--bg-row-even: #1f2937;--bg-row-odd: #111827;--bg-base-col: #1e3a5f;--bg-diff: #422006;--border: #374151;--text: #f9fafb;--text-muted: #9ca3af;--shadow: 0 1px 3px rgba(0, 0, 0, .3)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{font-family:var(--font);background:var(--bg);color:var(--text);font-size:13px;line-height:1.5}.src-root{display:flex;flex-direction:column;height:100vh;overflow:hidden;padding:10px 12px 8px;gap:8px}.selector-bar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;padding:10px 12px;background:var(--bg-subtle);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);flex-shrink:0}.role-selector-group{display:flex;flex-direction:column;gap:3px;min-width:160px;max-width:220px;flex:1 1 160px}.role-label{font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}.base-label{color:#2563eb}body.dark-theme .base-label{color:#60a5fa}.select-wrapper{position:relative}.role-select{width:100%;padding:5px 8px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg);color:var(--text);font-size:12px;font-family:var(--font);-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;transition:border-color .15s}.role-select:focus{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.compare-select-row{display:flex;gap:4px;align-items:center}.compare-select-row .role-select{flex:1}.remove-slot-btn{background:none;border:none;cursor:pointer;color:var(--text-muted);display:flex;align-items:center;padding:2px;border-radius:4px;transition:color .15s;flex-shrink:0}.remove-slot-btn:hover{color:#ef4444}.compare-slots{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end;flex:1}.add-slot-btn{padding:5px 10px;font-size:12px;font-family:var(--font);background:none;border:1px dashed var(--border);border-radius:var(--radius);color:var(--text-muted);cursor:pointer;align-self:flex-end;margin-bottom:0;transition:border-color .15s,color .15s;white-space:nowrap}.add-slot-btn:hover:not(:disabled){border-color:#2563eb;color:#2563eb}.selector-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-left:auto}.error-bar{flex-shrink:0}.filter-bar{display:flex;align-items:center;gap:12px;flex-shrink:0;flex-wrap:wrap}.search-box{max-width:260px}.result-count{font-size:11px;color:var(--text-muted);margin-left:auto}.table-container{flex:1;overflow:auto;border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.comparison-table{width:100%;border-collapse:collapse;font-size:12px;table-layout:fixed}.comparison-table thead{position:sticky;top:0;z-index:10;background:var(--bg-subtle)}.comparison-table th{padding:7px 10px;text-align:left;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);border-bottom:2px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.col-entity{width:160px;min-width:100px;position:sticky;left:0;background:var(--bg-subtle);z-index:11;border-right:1px solid var(--border)}.col-operation{width:110px;min-width:80px}.col-role{width:120px;min-width:90px;text-align:center}.col-base{background:var(--bg-base-col)}.role-col-name{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.base-badge{margin-top:2px}.comparison-table tbody tr{border-bottom:1px solid var(--border);transition:background .1s}.row-even{background:var(--bg-row-even)}.row-odd{background:var(--bg-row-odd)}.comparison-table tbody tr:hover{background:var(--bg-subtle)}.entity-cell{font-weight:600;color:var(--text);vertical-align:top;padding-top:8px;position:sticky;left:0;background:inherit;z-index:1;border-right:1px solid var(--border)}.comparison-table td{padding:5px 10px;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.col-role-cell{text-align:center}.col-base-cell{background:var(--bg-base-col)}.cell-diff{background:var(--bg-diff)}.empty-row{text-align:center;color:var(--text-muted);padding:16px}.depth-dots{display:inline-flex;gap:3px;align-items:center;cursor:default}.depth-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex-shrink:0;transition:background .15s}.legend-bar{display:flex;align-items:center;gap:16px;flex-shrink:0;flex-wrap:wrap;padding:6px 4px;border-top:1px solid var(--border)}.legend-item{display:flex;align-items:center;gap:5px;white-space:nowrap}.legend-label{font-size:11px;color:var(--text-muted)}.diff-indicator{width:16px;height:12px;border-radius:3px;background:var(--bg-diff);border:1px solid #ca8a04;flex-shrink:0}body.dark-theme .diff-indicator{border-color:#92400e}.empty-state{flex:1;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:13px;text-align:center}
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Security Role Comparator</title>
|
|
7
|
+
<script type="module" crossorigin src="/index.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/index.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|