FEATURE: Invite emails to groups from add member modal (#10308)

This commit is contained in:
Mark VanLandingham
2020-08-04 10:02:01 -05:00
committed by GitHub
parent 413fa49032
commit b76731d722
15 changed files with 246 additions and 135 deletions

View File

@ -99,6 +99,10 @@ class Admin::GroupsController < Admin::AdminController
end
group.group_users.where(user_id: user.id).update_all(owner: true)
group_action_logger.log_make_user_group_owner(user)
if group_params[:notify_users] == "true" || group_params[:notify_users] == true
group.notify_added_to_group(user, owner: true)
end
end
group.restore_user_count!
@ -176,7 +180,8 @@ class Admin::GroupsController < Admin::AdminController
:membership_request_template,
:owner_usernames,
:usernames,
:publish_read_state
:publish_read_state,
:notify_users
]
custom_fields = DiscoursePluginRegistry.editable_group_custom_fields
permitted << { custom_fields: custom_fields } unless custom_fields.blank?