pnp / pnp/pnpframework

GetAllUniqueRoleAssignments caching data key

Open
#472 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

Dear community,

It looks to me that there is a defect in GetAllUniqueRoleAssignments extension, preceisly EnsureGroupCache.
The cache key is groupLoginName which is unique for one site, but ambigious when working with many sites at once.

In SharePoint sites we can have sharepoint groups. Different sites can have same group name, but each contains different set of memebers.

The problem appears when crawling multpile sites with GetAllUniqueRoleAssignments. Since cache behind is a static dictionary, it remembers all processed site data from the beginning.
During crawling, when running GetAllUniqueRoleAssignments for a site where sharepoint groups are duplicated, you get old data from dictionary.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing GetAllUniqueRoleAssignments and its EnsureGroupCache path to locate the static dictionary and understand how groupLoginName is used. Reproduce the crawl with identically named groups on different sites; done means results for one site are not reused for another site's group.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.