Skip to content

Consolidate CC services access check logic

Alejandro Rodríguez requested to merge consolidate-cc-auth into master

What does this MR do and why?

Currently, the Cloud Connector authorization logic is repeated on every individual AI service access check, which makes it hard to maintain and can lead to undesired logic drift. We consolidate all these logic into User#allowed_to_use? and have it replace CloudConnector::BaseAvailableServiceData.enabled_for?, since we're trying to remove billing and settings logic from the CloudConnector classes (ref).

Taken from !163409 (closed), which we're breaking into more manageable pieces.

Closes #473087 (closed)

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Alejandro Rodríguez

Merge request reports

Loading