Smriti 521362/application setting to disable invite users
What does this MR do and why?
Solves #521362 (closed)
References
Added new application setting for disabling Invite members
to the group by group owners.
Screenshots
- Group page when user does not have ability to invite users
Steps to test this feaure
- Login to your local installation
gdk.test
as admin owner and enable settingPrevent group member invitations
under Settings> General> Visibility and access controls - Access group members page as group owner https://gdk.test:3443/groups/<group_name>/-/group_members You should observe that buttons
Invite members
andInvite a group
are not visible - Access group members page as instance admin and invite buttons are visible again.
Continue testing by disabling the application setting and button reappearing on the screen again.
Steps to test API
- Create an access token as owner of the group
- Use the following curl API call with the admin setting
Prevent group member invitations
disabled -
curl --request POST --header "PRIVATE-TOKEN: <access_token>" \
--data "email=test@example.com&user_id=2&access_level=30" "https://gdk.test:3443/api/v4/groups/<:id>/invitations" -k
curl --request POST --header "PRIVATE-TOKEN: <access_token>" \
--data "email=test@example.com&user_id=2&access_level=30" "https://gdk.test:3443/api/v4/projects/<:id>/invitations" -k
This curl command should work and returns success as status
- Use the curl command with admin setting
Prevent group member invitations
enabled -
The curl command returns 403 Forbidden
error
This MR lacks documentation updates. To limit the scope of this MR and get the one wrapped up quick I am raising another MR for updating the documentation related with this change. -!190273 (merged)
Edited by Smriti Garg