Skip to content

Fix: allow Guest access AI when assigned to seat

Aleksei Lipniagov requested to merge 468443-allow-guests-access-ai into master

What does this MR do and why?

As specified in https://gitlab.com/gitlab-org/gitlab/-/issues/444274#decision-record (decision 7)

Guest users can access Duo features (applicable to both Pro and Ent) - An admin should be allowed to provision a Duo seat to a guest user, and guest users should be able to access all Duo features as applicable (no additional gates/checks implemented beyond base permissions set). For example - a Guest user will be able to access issue summarization functionality, but can't access Vulnerability Explanation because they can't see Vuln reports (due to Guest User permissions). We will address any shortcomings on user management/reporting - and evaluate if we want to modify packaging at a later date. Decision approved by @justinfarris on 2024-07-01

It was like that originally, but we [at Cloud Connector] introduced a bug during the refactoring.

The fix uses the solution suggested in #468443 (comment 1961499397).

We can't use current_user.duo_pro_add_on_available? in that place anymore because we expect to have multiple add-ons. Cloud Connector access logic should stay independent from the particular add-on name.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

As described in the bug report: #468443 (closed)

Please note that to use the rake task from !156511 (merged), you need to switch there, run the task, and switch back (to this branch or master depending on what you test). Because it's not merged yet. If you run the rake task from the master, it does not provide you the add-on purchase, so you would need CDot running on your instance.

Related to #468443 (closed)

Edited by Aleksei Lipniagov

Merge request reports