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
Merged

Conversation

Varuuna
Copy link

@Varuuna Varuuna 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'.

@msftclas
Copy link

msftclas commented Apr 8, 2019

CLA assistant check
All CLA requirements met.

@codecov-io
Copy link

codecov-io 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 April 8, 2019 08:57
@estruyf estruyf merged commit 20bace4 into pnp:dev Apr 24, 2019
@estruyf estruyf added this to the 1.13.0 milestone Apr 24, 2019
@estruyf
Copy link
Member

estruyf 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 mentioned this pull request Apr 24, 2019
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.

None yet

4 participants