docs(07-05): complete UserAccessAuditView plan
- 07-05-SUMMARY.md: view with people picker, summary banner, color-coded DataGrid - STATE.md: progress updated to 85% (11/13), decisions recorded, session updated - ROADMAP.md: phase 7 in progress with 6/8 summaries complete
This commit is contained in:
@@ -53,7 +53,7 @@ Plans:
|
|||||||
2. Running the audit returns a list of all access entries the user holds across the selected sites
|
2. Running the audit returns a list of all access entries the user holds across the selected sites
|
||||||
3. Results distinguish between direct role assignments, SharePoint group memberships, and inherited access
|
3. Results distinguish between direct role assignments, SharePoint group memberships, and inherited access
|
||||||
4. Results can be exported to CSV or HTML in the same format established by v1.0 export patterns
|
4. Results can be exported to CSV or HTML in the same format established by v1.0 export patterns
|
||||||
**Plans:** 5/8 plans executed
|
**Plans:** 6/8 plans executed
|
||||||
Plans:
|
Plans:
|
||||||
- [ ] 07-01-PLAN.md — UserAccessEntry model + service interfaces (Wave 1)
|
- [ ] 07-01-PLAN.md — UserAccessEntry model + service interfaces (Wave 1)
|
||||||
- [ ] 07-02-PLAN.md — UserAccessAuditService implementation (Wave 2)
|
- [ ] 07-02-PLAN.md — UserAccessAuditService implementation (Wave 2)
|
||||||
@@ -96,6 +96,6 @@ Plans:
|
|||||||
| 4. Bulk Operations and Provisioning | v1.0 | 10/10 | Complete | 2026-04-03 |
|
| 4. Bulk Operations and Provisioning | v1.0 | 10/10 | Complete | 2026-04-03 |
|
||||||
| 5. Distribution and Hardening | v1.0 | 3/3 | Complete | 2026-04-03 |
|
| 5. Distribution and Hardening | v1.0 | 3/3 | Complete | 2026-04-03 |
|
||||||
| 6. Global Site Selection | 5/5 | Complete | 2026-04-07 | - |
|
| 6. Global Site Selection | 5/5 | Complete | 2026-04-07 | - |
|
||||||
| 7. User Access Audit | 5/8 | In Progress| | - |
|
| 7. User Access Audit | 6/8 | In Progress| | - |
|
||||||
| 8. Simplified Permissions | v1.1 | 0/? | Not started | - |
|
| 8. Simplified Permissions | v1.1 | 0/? | Not started | - |
|
||||||
| 9. Storage Visualization | v1.1 | 0/? | Not started | - |
|
| 9. Storage Visualization | v1.1 | 0/? | Not started | - |
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ gsd_state_version: 1.0
|
|||||||
milestone: v1.0
|
milestone: v1.0
|
||||||
milestone_name: milestone
|
milestone_name: milestone
|
||||||
status: completed
|
status: completed
|
||||||
stopped_at: Completed 07-04-PLAN.md
|
stopped_at: Completed 07-05-PLAN.md
|
||||||
last_updated: "2026-04-07T10:45:02.830Z"
|
last_updated: "2026-04-07T10:50:37.502Z"
|
||||||
last_activity: 2026-04-07 — Roadmap created (Phases 6-9), 10/10 requirements mapped
|
last_activity: 2026-04-07 — Roadmap created (Phases 6-9), 10/10 requirements mapped
|
||||||
progress:
|
progress:
|
||||||
total_phases: 4
|
total_phases: 4
|
||||||
completed_phases: 1
|
completed_phases: 1
|
||||||
total_plans: 13
|
total_plans: 13
|
||||||
completed_plans: 10
|
completed_plans: 11
|
||||||
---
|
---
|
||||||
|
|
||||||
# Project State
|
# Project State
|
||||||
@@ -52,6 +52,7 @@ Phase 6 [ ] → Phase 7 [ ] → Phase 8 [ ] → Phase 9 [ ]
|
|||||||
| Phase 07-user-access-audit P02 | 1 | 1 tasks | 1 files |
|
| Phase 07-user-access-audit P02 | 1 | 1 tasks | 1 files |
|
||||||
| Phase 07-user-access-audit P06 | 2 | 2 tasks | 2 files |
|
| Phase 07-user-access-audit P06 | 2 | 2 tasks | 2 files |
|
||||||
| Phase 07-user-access-audit P04 | 2 | 1 tasks | 1 files |
|
| Phase 07-user-access-audit P04 | 2 | 1 tasks | 1 files |
|
||||||
|
| Phase 07-user-access-audit P05 | 4 | 2 tasks | 2 files |
|
||||||
|
|
||||||
## Accumulated Context
|
## Accumulated Context
|
||||||
|
|
||||||
@@ -85,6 +86,8 @@ Decisions are logged in PROJECT.md Key Decisions table.
|
|||||||
- [Phase 07-user-access-audit]: HTML sortTable() scoped per group so sorting in by-user view keeps each user's rows together
|
- [Phase 07-user-access-audit]: HTML sortTable() scoped per group so sorting in by-user view keeps each user's rows together
|
||||||
- [Phase 07-04]: CollectionViewSource bound at construction; ApplyGrouping() swaps PropertyGroupDescription between UserLogin/SiteUrl on IsGroupByUser toggle
|
- [Phase 07-04]: CollectionViewSource bound at construction; ApplyGrouping() swaps PropertyGroupDescription between UserLogin/SiteUrl on IsGroupByUser toggle
|
||||||
- [Phase 07-04]: ExportCsvAsync uses WriteSingleFileAsync (combined file) not WriteAsync (per-user directory) to match SaveFileDialog single-path UX
|
- [Phase 07-04]: ExportCsvAsync uses WriteSingleFileAsync (combined file) not WriteAsync (per-user directory) to match SaveFileDialog single-path UX
|
||||||
|
- [Phase 07-05]: Autocomplete ListBox visibility managed via code-behind CollectionChanged — WPF DataTrigger cannot compare to non-zero Count without converter
|
||||||
|
- [Phase 07-05]: Simple ListBox autocomplete (not Popup) following plan's recommended simpler alternative — avoids Popup placement issues
|
||||||
|
|
||||||
### Pending Todos
|
### Pending Todos
|
||||||
|
|
||||||
@@ -96,6 +99,6 @@ None.
|
|||||||
|
|
||||||
## Session Continuity
|
## Session Continuity
|
||||||
|
|
||||||
Last session: 2026-04-07T10:45:02.828Z
|
Last session: 2026-04-07T10:50:37.500Z
|
||||||
Stopped at: Completed 07-04-PLAN.md
|
Stopped at: Completed 07-05-PLAN.md
|
||||||
Resume file: None
|
Resume file: None
|
||||||
|
|||||||
107
.planning/phases/07-user-access-audit/07-05-SUMMARY.md
Normal file
107
.planning/phases/07-user-access-audit/07-05-SUMMARY.md
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
---
|
||||||
|
phase: 07-user-access-audit
|
||||||
|
plan: 05
|
||||||
|
subsystem: view
|
||||||
|
tags: [view, xaml, wpf, people-picker, datagrid, color-coding, grouping, filtering, summary-banner]
|
||||||
|
|
||||||
|
requires:
|
||||||
|
- phase: 07-04
|
||||||
|
provides: [UserAccessAuditViewModel with all observable properties and commands]
|
||||||
|
- phase: 07-01
|
||||||
|
provides: [UserAccessEntry, AccessType enum]
|
||||||
|
provides:
|
||||||
|
- UserAccessAuditView XAML + code-behind wired to UserAccessAuditViewModel
|
||||||
|
affects: [07-07, 07-08]
|
||||||
|
|
||||||
|
tech-stack:
|
||||||
|
added: []
|
||||||
|
patterns: [PermissionsView two-panel layout, DataTrigger row color-coding, GroupStyle Expander, code-behind CollectionChanged wiring for autocomplete visibility]
|
||||||
|
|
||||||
|
key-files:
|
||||||
|
created:
|
||||||
|
- SharepointToolbox/Views/Tabs/UserAccessAuditView.xaml
|
||||||
|
- SharepointToolbox/Views/Tabs/UserAccessAuditView.xaml.cs
|
||||||
|
modified: []
|
||||||
|
|
||||||
|
key-decisions:
|
||||||
|
- "Autocomplete ListBox visibility managed from code-behind via SearchResults.CollectionChanged rather than DataTrigger — WPF DataTrigger cannot compare to non-zero Count without a converter"
|
||||||
|
- "Single ListBox for autocomplete (not Popup) following plan's recommended simpler alternative — avoids Popup placement complexity"
|
||||||
|
- "Dialog factory wiring deferred to plan 07-07 (MainWindow.xaml.cs) as specified; code-behind is minimal"
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
duration_minutes: 4
|
||||||
|
completed_date: "2026-04-07"
|
||||||
|
tasks_completed: 2
|
||||||
|
files_created: 2
|
||||||
|
files_modified: 0
|
||||||
|
---
|
||||||
|
|
||||||
|
# Phase 7 Plan 05: UserAccessAuditView Summary
|
||||||
|
|
||||||
|
**XAML view for User Access Audit tab with people-picker autocomplete (ListBox shown via CollectionChanged), removable user pills, site picker, scan options, 3-card summary banner, filter TextBox, group-by ToggleButton, color-coded DataGrid with access type icons, Guest badge for external users, warning icon for high-privilege rows, and GroupStyle Expander headers — zero-error build.**
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
- **Duration:** ~4 min
|
||||||
|
- **Started:** 2026-04-07T10:46:02Z
|
||||||
|
- **Completed:** 2026-04-07T10:49:45Z
|
||||||
|
- **Tasks:** 2
|
||||||
|
- **Files modified:** 2
|
||||||
|
|
||||||
|
## Accomplishments
|
||||||
|
|
||||||
|
- `UserAccessAuditView.xaml` (~415 lines) — two-panel layout following PermissionsView pattern with all required UI elements bound to UserAccessAuditViewModel properties
|
||||||
|
- Left panel: People picker GroupBox (search TextBox + autocomplete ListBox + removable pill ItemsControl + SelectedUsersLabel), Site GroupBox (site picker button + SitesSelectedLabel), Scan Options GroupBox (3 checkboxes), action buttons (Run/Cancel + CSV/HTML export in 2x2 grid)
|
||||||
|
- Right panel: Summary banner (3 stat cards for TotalAccessCount, SitesCount, HighPrivilegeCount with distinct color schemes), filter TextBox + group-by ToggleButton toolbar, DataGrid with ResultsView ICollectionView binding
|
||||||
|
- DataGrid row style: DataTriggers for AccessType (Direct=blue #EBF5FB, Group=green #EAFAF1, Inherited=gray #F4F6F6) + FontWeight=Bold for IsHighPrivilege
|
||||||
|
- DataGrid columns: User (with orange Guest badge for IsExternalUser), Site, Object, Permission Level (with warning triangle icon for IsHighPrivilege), Access Type (with Segoe UI Symbol icon + colored label), Granted Through
|
||||||
|
- GroupStyle with Expander template showing group name + ItemCount
|
||||||
|
- Status bar with ProgressBar (0-100) + StatusMessage spanning both columns
|
||||||
|
- `UserAccessAuditView.xaml.cs` — minimal code-behind with DI constructor, CollectionChanged wiring for autocomplete visibility, and OnSearchResultClicked handler
|
||||||
|
|
||||||
|
## Task Commits
|
||||||
|
|
||||||
|
1. **Task 1: Create UserAccessAuditView XAML layout** - `bb9ba9d` (feat)
|
||||||
|
2. **Task 2: Create UserAccessAuditView code-behind** - `975762d` (feat)
|
||||||
|
|
||||||
|
## Files Created/Modified
|
||||||
|
|
||||||
|
- `SharepointToolbox/Views/Tabs/UserAccessAuditView.xaml` — Full audit tab XAML with two-panel layout, people picker, summary banner, color-coded DataGrid
|
||||||
|
- `SharepointToolbox/Views/Tabs/UserAccessAuditView.xaml.cs` — Code-behind with ViewModel injection, autocomplete visibility wiring, click handler
|
||||||
|
|
||||||
|
## Decisions Made
|
||||||
|
|
||||||
|
1. **Autocomplete ListBox visibility via code-behind** — WPF DataTriggers can only match exact values (e.g., `True`/`False`), not "Count > 0". Rather than adding a converter or a `HasSearchResults` bool property to the ViewModel, the code-behind subscribes to `SearchResults.CollectionChanged` and sets `SearchResultsList.Visibility` directly. This keeps the ViewModel clean and avoids adding converter infrastructure.
|
||||||
|
|
||||||
|
2. **Simple ListBox instead of Popup** — The plan listed a Popup as the primary approach and a "simpler alternative" of a ListBox directly below the TextBox. The ListBox approach was chosen to avoid Popup placement issues (the Popup can overlap other controls or escape the panel bounds). The visual result is equivalent.
|
||||||
|
|
||||||
|
3. **Dialog factory deferred to 07-07** — As specified in the plan, the SitePickerDialog factory is not wired in the code-behind. It will be set from MainWindow.xaml.cs in plan 07-07, following the same pattern used by PermissionsView.
|
||||||
|
|
||||||
|
## Deviations from Plan
|
||||||
|
|
||||||
|
### Auto-fixed Issues
|
||||||
|
|
||||||
|
**1. [Rule 2 - Missing functionality] Autocomplete visibility from code-behind**
|
||||||
|
- **Found during:** Task 2
|
||||||
|
- **Issue:** WPF DataTrigger cannot bind to `SearchResults.Count > 0` without a value converter. The initial XAML used a `CountToVisibilityConverter` reference that did not exist, causing a build error.
|
||||||
|
- **Fix:** Removed converter reference, set initial `Visibility="Collapsed"` on ListBox, wired `SearchResults.CollectionChanged` in code-behind to toggle visibility based on Count.
|
||||||
|
- **Files modified:** `UserAccessAuditView.xaml`, `UserAccessAuditView.xaml.cs`
|
||||||
|
- **Commit:** Included in `975762d`
|
||||||
|
|
||||||
|
## Issues Encountered
|
||||||
|
|
||||||
|
Build error MC2000 on first attempt — `CountToVisibilityConverter` reference was leftover from an intermediate version of the XAML. Fixed by switching to code-behind wiring.
|
||||||
|
|
||||||
|
## User Setup Required
|
||||||
|
|
||||||
|
None — no external service configuration required.
|
||||||
|
|
||||||
|
## Next Phase Readiness
|
||||||
|
|
||||||
|
- UserAccessAuditView ready to be registered in DI and added as a tab in MainWindow (plan 07-07)
|
||||||
|
- All ViewModel bindings are wired: people picker, site picker, scan options, run/cancel/export, DataGrid with grouping/filtering, summary banner
|
||||||
|
- Dialog factory (`OpenSitePickerDialog`) left as `null` — to be wired in 07-07 from MainWindow.xaml.cs
|
||||||
|
|
||||||
|
---
|
||||||
|
*Phase: 07-user-access-audit*
|
||||||
|
*Completed: 2026-04-07*
|
||||||
Reference in New Issue
Block a user