Fix #435: add --role/-r to creategroup - #447
Open
jacalata wants to merge 1 commit into
Open
Conversation
tabcmd Classic accepts a default site role for the group at creation time via --role/-r; users added later without an explicit role inherit this default. tabcmd 2 was missing the flag, so groups were always created with no minimum_site_role. Reuse UserCommand.set_role_arg for the same choices and case-insensitive parsing that createsiteusers/removeusers use, and set GroupItem.minimum_site_role before calling groups.create when the flag was supplied. TSC handles the wire-format via update_req(). Fixes #435.
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.
Summary
--role/-roncreategroupto set a default site role for the group; users added later without an explicit role inherit that default.minimum_site_role.UserCommand.set_role_argfor the same choices and case-insensitive parsing used by other user commands, and setGroupItem.minimum_site_rolebeforeserver.groups.createwhen the flag is supplied. TSC handles the wire XML.Closes #435.
Test plan
tests/parsers/test_parser_create_group.py— 4 new tests cover--role Viewer,-r Explorer, case-insensitivecreator->Creator, and flag-optionaltest_parser_create_group.pysuite: 6 passed🤖 Generated with Claude Code