• Type: MMF
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:


      Why - Context

      SonarCloud users upgrade their org to the paid plan only for one thing: to have private projects. However, in SonarCloud, the enclosing organization remains visible to the rest of the world:

      • Members - which is the main privacy problem often raised on the contact form
      • Quality Profiles and Quality Gates - even if the information does not seem that sensitive

      More generally, when users upgrade to the paid plan, they unconsciously infer that everything will be private within their organization - and this sounds natural for everybody in fact. We can therefore consider that our "implementation" of the paid plan is misleading.

      If we did not come from the OSS world where we use GitHub, we would probably not have designed organizations this way at first taking into consideration that:

      • Most people doing open-source will have public only projects within their orgs
      • Most customers will have private only projects within their orgs
      • We are in fact talking about a few cases where customers want both public and private projects within their org

      We should therefore find a solution that is the easiest to understand for most users and customers, even if it's a little more complicated to the few others that have a mixed public/private project org.

      Sponsors: Olivier, Fabrice

      What - Use cases

      To make something clear and simple for everybody:

      • Free plan organizations are public
        • Everything is visible from the outside
          • => While working on this MMF, let's make the "Members" page visible only to org members - even for public orgs
        • This is what we currently have for free plan orgs
      • Paid plan organizations are private
        • Nothing is visible from the outside - except the organization itself if one knows the URL
          • Note: if there is a privacy question about this, customers can remove the organization details (name, description, URL, logo) - in which case only the organization can be found
          • Note 2: if this turns to be a problem in the future, we'll see how to fully hide this using an explicit "Visibility" option at organization level
        • Only members see what's inside the organization
        • The "default visibility" setting must be dropped since all projects are private when being created.

      This will fit 99% of our current users' needs.

      For the existing customers who have both public and private projects:

      • We will allow to set a project as public inside a private org
      • When turning the first project to public:
        • For anonymous users:
          • The "Projects" page will list the visible projects
          • The "Issues" page will also list the issues of the public projects
          • The "Quality Profiles", "Quality Gate" and "Rules" pages will remain private. As a consequence:
            • The quality profiles and quality gate won't be displayed on the project home page
            • Rule permalink on the "Issues" page won't be available
        • For members of the private org:
          • They will see a "Public" badge instead of a "Private" badge
            • Side note: it would be convenient to add a tooltip explaining how to easily switch from private to public (and vice versa)
      • For existing customers having public projects, when deploying this feature, we don't expect to do anything special (visibility of projects will be kept and we may notify some customers who are in this case if we feel this is suspicious)

      This MMF should not impact the top right search (even in terms of UI/UX - no need to display the visibility there).

      This solution of having public projects inside a private org will work for the all use cases - with some limitations:

      • Employees of the org who are working on the public projects are supposed to be members of the org, so no impact for them.
      • Contributors on the public projects will have some limitations due to the fact that they won't be members of the private org:
        • In the Web UI, they won't be able to see the QPs and QG - so we should handle this nicely
        • In SonarLint, if they try to bind to the project, they won't be able to get the quality profiles - so we should handle this nicely
        • If they try to run an analysis of the project, should fail properly (probably from the very beginning of the scan)

      What happens:

      • When a free plan org is upgraded to the paid plan org?
        • If there are projects in the org, then we notify the user that they will remain public until they are turned to private
      • When a paid plan org is downgraded to the free plan org?
        • All projects are deleted except the public ones - if any

      Current design solution

      We now have badges for private projects and public projects as well. Those badges are only visible to org members and admin. They can be seen on projects cards and project headers.

      Paid organization page

      Paid orgs are visible to non members. But they will be able to only see the org name, description, logo, key and its public projects, but cannot access Quality Gates, Quality Profiles, Members and Rules.

      Admin and Members of the same organization will see it with the Quality Profiles, Quality Gates, Rules, and Members tabs available. Private projects have a "Private" badge, and public projects have a "Public" badge with a special color to draw attention on potential privacy risks.

      Each badge displays inline documentation on hover:

      NB: the documentation page "Organization and Project Privacy" is not created yet.

      Free organization page

      Members and Admins of a free organization will see "Public" badges on each project, and on the page header.

      Each badge displays inline documentation on hover:

      Anonymous users will see the same page without the badges. As the org is public, Quality Gates, Quality Profiles and Rules are available to non members.

      Project Homepage

      Admin and Members of an org will see a private project with the "Private" badge in the header (and its corresponding tooltip)

      Admin and Members of a free org will see a public project with the regular "Public" badge in the header (and its corresponding tooltip)

      Admin and Members of a paid org will see a public project with the colored "Public" badge in the header (and its corresponding tooltip)

      Anonymous users viewing a public project from a public org will see a regular project homepage with no badge

      Anonymous users viewing a public project from a private org will see a project homepage with no badge and no mention of Quality Gates or Quality Profile in the sidebar.

      Org administration

      The Projects Management page now displays a "Visibility" column. Default visibility of projects can no longer be customized. The default is "private" for private orgs and "public" for public orgs.


      Organizations that are upgraded to a paid plan while already having public projects will see a different success message after upgrade.


      // To be discussed with the dev team


        1. SonarCloud_Private_Orgs_01.png
          129 kB
        2. SonarCloud_Private_Orgs_02.png
          161 kB
        3. SonarCloud_Private_Orgs_03.png
          189 kB
        4. SonarCloud_Private_Orgs_04.png
          187 kB
        5. SonarCloud_Private_Orgs_05.png
          207 kB
        6. SonarCloud_Private_Orgs_06.png
          181 kB
        7. SonarCloud_Private_Orgs_07.png
          185 kB
        8. SonarCloud_Private_Orgs_08.png
          123 kB
        9. SonarCloud_Private_Orgs_09.png
          143 kB
        10. SonarCloud_Private_Orgs_10.png
          142 kB
        11. SonarCloud_Private_Orgs_11.png
          143 kB
        12. SonarCloud_Private_Orgs_12.png
          140 kB
        13. SonarCloud_Private_Orgs_13.png
          129 kB

          Issue Links



              • Assignee:
                fabrice.bellingard Fabrice Bellingard
                fabrice.bellingard Fabrice Bellingard
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: