Allow self-managed instances to require licensed seats for Duo Chat
What does this MR do and why?
This MR introduces the ability for self-managed GitLab instances to require licensed seats for Duo Chat using the existing duo_chat_requires_licensed_seat_sm
feature flag. Before this MR, it was enabled globally due to Chat GA.
Here is a similar MR for .com
. The difference is: with this MR, it is configured only by an instance-wide feature flag, whereas in .com
, it can also be turned on or off per group.
Related to #457283 (closed)
MR acceptance checklist
Screenshots or screen recordings
N/A
How to set up and validate locally
################
# Condition:
# Make sure user does not have Duo Pro add-on enabled
User.first.duo_pro_add_on_available? # => false
# Test Case: When flag is disabled, user can access chat.
Feature.disable(:duo_chat_requires_licensed_seat_sm)
# Test Case: When flag is enabled, user cannot access chat.
Feature.enable(:duo_chat_requires_licensed_seat_sm)
################
# Update condition:
# - The user has duo pro seat.
User.first.duo_pro_add_on_available? # => true
# Test Case: When flag is disabled, user can access chat.
Feature.disable(:duo_chat_requires_licensed_seat_sm)
# Test Case: When flag is enabled, user can access chat.
Feature.enable(:duo_chat_requires_licensed_seat_sm)
Edited by Lesley Razzaghian