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

Add ReadOnlyProviders option for session configuration files #21528

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

SeeminglyScience
Copy link
Collaborator

@SeeminglyScience SeeminglyScience commented Apr 24, 2024

PR Summary

Adds option in a session configuration file to make a provider visible, but not able to be written to.

PR Context

Keeping this as WIP only because I expect issues with the test. Will take it out of draft after getting that working.

PR Checklist

@SeeminglyScience SeeminglyScience changed the title WIP: Add ReadOnlyProviders option for session configuration files Add ReadOnlyProviders option for session configuration files Apr 24, 2024
@SeeminglyScience SeeminglyScience marked this pull request as ready for review April 24, 2024 22:03
@microsoft-github-policy-service microsoft-github-policy-service bot added the Review - Needed The PR is being reviewed label May 6, 2024
Copy link
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@@ -2029,6 +2033,28 @@ public override InitialSessionState GetInitialSessionState(PSSenderInfo senderIn
}
}

if (readonlyProvidersApplied)
{
string[] providers = TryGetStringArray(_configHash[ConfigFileConstants.ReadOnlyProviders]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code below this for providerVisibilityApplied uses a case-insensitive hashtable which looks unnecessary to me? The asymmetry between this and the latter would create confusion for future people reading the code. Seems like we either need to either make them the same or add a comment why they are different.

@microsoft-github-policy-service microsoft-github-policy-service bot added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Review - Needed The PR is being reviewed labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants