Skip to content

Fix SearchEEEU report button duplication and incorrect search results - #151

Closed
Gunjan Datta (gudatta) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-149
Closed

Fix SearchEEEU report button duplication and incorrect search results#151
Gunjan Datta (gudatta) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-149

Conversation

Copilot AI commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

This PR fixes two critical issues in the SearchEEEU report that were causing UI problems and incorrect search results:

Issues Fixed

1. Button Duplication in Top Site Tab

The "View Group" button was rendering twice when search results contained items with both ListId and GroupId properties. This occurred due to overlapping conditional logic in the button rendering code:

// Before: Two separate conditions could both trigger
if (row.ListId) {
    tooltips.add({ text: "View Group" }); // First button
}
if (row.GroupId > 0) {
    tooltips.add({ text: "View Group" }); // Second button - DUPLICATE
}

2. Incorrect Search Results for EEEU Accounts

The search filters were incomplete and not properly identifying "Everyone except external users" accounts, causing the report to miss important security findings. The original filters only checked for:

  • Title eq 'Everyone'
  • substringof('spo-grid-all-users', Name)

Solution

Button Logic: Refactored the button rendering to use mutually exclusive conditions that prioritize the most specific context:

  • Group members: Show "View Group" and "Remove From Group"
  • List items with unique permissions: Show "View Permissions" and "Restore"
  • Site-level permissions: Show "Remove From Site"

Search Filters: Enhanced both role assignment and user information filters to comprehensively identify EEEU accounts:

Filter: `Title eq 'Everyone' or Title eq 'Everyone except external users' or substringof('spo-grid-all-users', Name) or Name eq 'c:0(.s|true'`

This ensures the report correctly identifies all variations of "Everyone" and "Everyone except external users" accounts across different SharePoint configurations.

Impact

  • Eliminates duplicate buttons in the Top Site tab UI
  • Provides accurate and complete search results for security auditing
  • Maintains backward compatibility with existing functionality
  • Aligns filter logic with the permissions report for consistency

Fixes #149.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: gudatta <56934979+gudatta@users.noreply.github.com>
Copilot AI changed the title [WIP] Search Report Results Incorrect Fix SearchEEEU report button duplication and incorrect search results Aug 20, 2025
@gudatta
Gunjan Datta (gudatta) deleted the copilot/fix-149 branch August 21, 2025 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search Report Results Incorrect

2 participants