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

Feature #529 - added cmdlet to retrieve list item permissions #1534

Merged
merged 19 commits into from
Jun 1, 2022

Conversation

gautamdsheth
Copy link
Collaborator

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #529

What is in this Pull Request ?

Added Get-PnPListItemPermissions cmdlet to retrieve list item permissions

@KoenZomers
Copy link
Collaborator

When I run this, I get an output such as:
image

representing these permissions:

image

Can we not make this a little more useful? The PrincipalId by itself says nothing. We would have to use Get-PnPGroup or Get-PnPUser to find out what's behind the principal. And we don't know in advance which of these two to use.

@KoenZomers KoenZomers added the in review PR or issue is currently being reviewed label Jan 27, 2022
@gautamdsheth
Copy link
Collaborator Author

@KoenZomers - should be more useful now.

image

@gautamdsheth gautamdsheth requested a review from KoenZomers May 23, 2022 18:18
@gautamdsheth gautamdsheth removed their assignment May 23, 2022
@KoenZomers
Copy link
Collaborator

@gautamdsheth I don't believe the permissions property is very useful this way. It was better how it was initially. The PrincipalName property is more useful already. I wonder though if we can make it even better by having a property or some kind of indicator making it clear that its a SharePoint Group or a user? One could check if it starts with i:0#.f, but that feels a bit flaky. Would there be an easy better way you think?

image

@gautamdsheth
Copy link
Collaborator Author

You are right, have fixed it now :)

image

@KoenZomers
Copy link
Collaborator

Much better! Last nag from my side, do you think it would be possible to also add a flag if the permission is inherited from its parent or is unique to the item? That would also be very valuable. After that I stop nagging :)

@gautamdsheth
Copy link
Collaborator Author

Done, not a nag at all Koen :)

I did change a few things like changing the return type and all, hope thats ok with you ?

image

@KoenZomers KoenZomers removed the in review PR or issue is currently being reviewed label Jun 1, 2022
@KoenZomers KoenZomers merged commit 815a56b into pnp:dev Jun 1, 2022
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.

[FEATURE] Get-PnPListItemPermissions
2 participants