PowerShell / SHiPS

Simple Hierarchy in PowerShell - developing PowerShell provider got so much easier
MIT License
185 stars 31 forks source link

Add Credentials capability to SHiPSProvider #111

Closed yurko7 closed 5 years ago

yurko7 commented 5 years ago

Add Credentials capability to SHiPSProvider and add Drive property to ProviderContext (#110)

msftclas commented 5 years ago

CLA assistant check
All CLA requirements met.

jianyunt commented 5 years ago

@yurko7 Thank you for updating the code and .md docs. Could you please add an sample under .\samples and add a test case for the credential feature?

Other than Credential, what are other cases where the script provider needs to know the ProviderInfo? I am thinking wethere we expose the Cred is enough.

yurko7 commented 5 years ago

@jianyunt Yes, sure, I'll add a sample and test case.

And regarding your second question, just wondering, what is the reason to limit provider context? Why not to expose the original P2F provider context with all it's potentially useful properties and methods to script providers? If this can be an issue, then I'll expose drive credentials only.

jianyunt commented 5 years ago

It increases test coverage. Currently we have only GetChildItems(). If later we add Set-, Get-content, New-Item... etc., we need to make sure exposed interfaces work well on these operations.


In reply to: 410153489 [](ancestors = 410153489)

jianyunt commented 5 years ago

@yurko7 May I know the reasons you close your PR? thanks.

yurko7 commented 5 years ago

@jianyunt, have unresolved issue with getting network credentials on child items. Got an "Exception: Item 'DriveCredentialTest' may no longer exists. Details: You cannot call a method on a null-valued expression.". Will resolve the issue and then will create a new pull request.