Skip to content

Added new setting allow_project_creation_for_guest_and_below

What does this MR do and why?

Adds allow_project_creation_for_guest_and_below which will be used to limit the behaviour of users with highest_role <= Guest.

If the flag is set to true (default), the behaviour would be as current prod.

If the flag is set to false , Guest and lower role would not be allowed to create personal projects, as creating projects can promote themselves into a paid seat.

This MR just adds the application setting.

The next MR adds the logic to control the behaviour

ref: #426279 (closed)

Screenshots or screen recordings

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

Before After

DB steps

ci: == [advisory_lock_connection] object_id: 348860, pg_backend_pid: 97893
main: == [advisory_lock_connection] object_id: 355180, pg_backend_pid: 97896
main: == 20231019093412 AddAllowProjectCreationForGuestAndBelowToApplicationSettings: migrating
main: -- add_column(:application_settings, :allow_project_creation_for_guest_and_below, :boolean, {:default=>true, :null=>false})
main:    -> 0.0014s
main: == 20231019093412 AddAllowProjectCreationForGuestAndBelowToApplicationSettings: migrated (0.0039s)

main: == [advisory_lock_connection] object_id: 355180, pg_backend_pid: 97896
ci: == [advisory_lock_connection] object_id: 361520, pg_backend_pid: 97898
ci: == 20231019093412 AddAllowProjectCreationForGuestAndBelowToApplicationSettings: migrating
ci: -- add_column(:application_settings, :allow_project_creation_for_guest_and_below, :boolean, {:default=>true, :null=>false})
ci:    -> 0.0014s
ci: == 20231019093412 AddAllowProjectCreationForGuestAndBelowToApplicationSettings: migrated (0.0070s)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Suraj Tripathi

Merge request reports