This commit is contained in:
tituspijean 2024-08-31 22:25:23 +02:00 committed by GitHub
commit ac40b21627
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 6 deletions

View file

@ -322,6 +322,7 @@ user:
extra:
pattern: *pattern_username
### user_group_add_mailalias()
add-mailalias:
action_help: Add mail aliases to group
api: PUT /users/groups/<groupname>/aliases/<aliases>
@ -336,6 +337,11 @@ user:
metavar: MAIL
extra:
pattern: *pattern_email
--force:
help: Ignore warnings about special groups
action: store_true
### user_group_remove_mailalias()
remove-mailalias:
action_help: Remove mail aliases to group
api: DELETE /users/groups/<groupname>/aliases/<aliases>
@ -348,8 +354,9 @@ user:
help: Mail aliases to remove
nargs: "+"
metavar: MAIL
--force:
help: Ignore warnings about special groups
action: store_true
permission:
subcategory_help: Manage permissions

View file

@ -1389,12 +1389,12 @@ def user_group_remove(groupname, usernames, force=False, sync_perm=True):
)
def user_group_add_mailalias(groupname, aliases):
return user_group_update(groupname, add_mailalias=aliases, sync_perm=False)
def user_group_add_mailalias(groupname, aliases, force=False):
return user_group_update(groupname, add_mailalias=aliases, force=force, sync_perm=False)
def user_group_remove_mailalias(groupname, aliases):
return user_group_update(groupname, remove_mailalias=aliases, sync_perm=False)
def user_group_remove_mailalias(groupname, aliases, force=False):
return user_group_update(groupname, remove_mailalias=aliases, force=force, sync_perm=False)
#