Add consolidated collection management script#33
Open
georgiaschafer wants to merge 3 commits intobitwarden-labs:mainfrom
Open
Add consolidated collection management script#33georgiaschafer wants to merge 3 commits intobitwarden-labs:mainfrom
georgiaschafer wants to merge 3 commits intobitwarden-labs:mainfrom
Conversation
Adapted from scripts found here - https://github.com/bitwarden-labs/admin-scripts/tree/main/Powershell Creates collection for new users, assigns Administrator group to all collections, moves collections created at the root to nest under the first user with permissions Optimizes functionality compared to original scripts by reducing calls to bw for each user
Rename and fix comments
Contributor
|
@georgiaschafer thank you very much for your submission, we do appreciate contributions to this repository. Here some general comments before approving your suggestions:
Don't hesitate to reach out with your thoughts and thank you very much again! |
…anization.ps1 Addressing comments from fer: 1. Added script header, including .SYNOPSIS, .DESCRIPTION, .PARAMETER, .EXAMPLE, .NOTES. 2. Changed name to format InfiniteActionVerb-FunctionChange.ps1 3. Checks "bw status" and only initiates login if status is "unathenticated" 4. Used ConvertFrom-Json to reduce code length. Changes aside from fer's recommendations: 1. Converted linear code into functions. 2. Added the ConvertFrom-SecureStringPlain used in Apply-NestedPermissions.ps1 and updated all instances where SecureString is converted to use this function. 3. Adapted Authenticate-Bitwarden from Apply-NestedPermissions.ps1 to include API authentication. 4. Separated confirming users into its own function instead of doing the confirm action inside the personal collection creation code. 5. Updated existing code to use parameters. Sending global parameters to function parameters to make functions modular. 6. Changed variable named $t to $query for clarity.
Author
|
@fer thanks for the feedback!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adapted from existing scripts. Optimizes functionality compared to original scripts by reducing calls to bw for each user/collection.
Creates collection for new users, assigns Administrator group to all collections, moves collections created at the root to nest under the first user with permissions.