Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SecurityTrimmedControl - Extended to specific folder or item for remote list or lib #271

Merged
merged 3 commits into from Apr 24, 2019

Conversation

Projects
None yet
4 participants
@Varuuna
Copy link

commented Apr 8, 2019

Q A
Bug fix? [ ]
New feature? [ X ]
New sample? [ ]
Related issues?

What's in this Pull Request?

This PR adds 2 optional properties to the SecurityTrimmedControl; folderPath and itemId that can be used when checking permission against a remote list or library. If either is present, we'll check the user's permission against a specified folder or item instead of the list itself.
A new function 'determineResource' is used to determine the url we send with our API call. It will prioritize 'itemId' first, if present, then 'folderPath', then finally 'remoteLibOrListUrl'.

Fredrik Andreasson added some commits Apr 8, 2019

@Varuuna

This comment has been minimized.

Copy link
Owner

commented on 509525c Apr 8, 2019

Had accidentally altered the wrong function.

@msftclas

This comment has been minimized.

Copy link

commented Apr 8, 2019

CLA assistant check
All CLA requirements met.

@codecov-io

This comment has been minimized.

Copy link

commented Apr 8, 2019

Codecov Report

Merging #271 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #271   +/-   ##
=======================================
  Coverage   72.33%   72.33%           
=======================================
  Files          17       17           
  Lines         759      759           
  Branches      146      156   +10     
=======================================
  Hits          549      549           
  Misses        163      163           
  Partials       47       47

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 892b624...20bace4. Read the comment docs.

@Varuuna Varuuna marked this pull request as ready for review Apr 8, 2019

@estruyf estruyf merged commit 20bace4 into SharePoint:dev Apr 24, 2019

3 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
license/cla All CLA requirements met.
Details

@estruyf estruyf added this to the 1.13.0 milestone Apr 24, 2019

@estruyf

This comment has been minimized.

Copy link
Collaborator

commented Apr 24, 2019

Thanks @Varuuna, I have merged your changed with some modifications to it. I have added two new enum properties to specify the type of security you want to check: remoteListItem and remoteFolder.

@estruyf estruyf referenced this pull request Apr 24, 2019

Merged

Merge for 1.13.0 #278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.