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

Update crowd.py #1406

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions atlassian/crowd.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,20 @@
users = [user["name"] for user in membership.find_all("user")]
memberships[group] = users
return memberships

def group_create(self, groupname, description=None, active=True):
"""
Create new group method
:param groupname: string: The name of new group
:param description: string: The description of new group, default is None
:param active: bool: Weather the group is active, default is True
:return: Create result
"""
group = {

Check warning on line 295 in atlassian/crowd.py

View check run for this annotation

Codecov / codecov/patch

atlassian/crowd.py#L295

Added line #L295 was not covered by tests
"name": groupname,
"active": active,
"description": description,
"type": "GROUP",
}

return self.post(self._crowd_api_url("usermanagement", "group"), data=group)

Check warning on line 302 in atlassian/crowd.py

View check run for this annotation

Codecov / codecov/patch

atlassian/crowd.py#L302

Added line #L302 was not covered by tests