Repository: readthedocs/readthedocs.org

Issue:
Update/Remove privacy level docs page
Although we are deprecating Privacy Levels in #2663 and #3781, we still expose the docs for this and it's completely broken and confuse our users.

https://docs.readthedocs.io/en/latest/privacy.html

I think we should take one of these actions:

1. remove that page completely
1. add a warning note saying that Privacy Levels are deprecated. Although, I think this doesn't make too much sense

Any action taken will need to write "a new documentation" page for the Corporate site, where these permission levels do work.


Discussion:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@humitos 
I am +1 on the first option.
Just needed to know that does this issue needs to wait for some time or not?
I am interested in sending a PR for this.
We took a first step by removing the "Protected" level at #5833 

Resolving patch:
diff --git a/readthedocs/core/mixins.py b/readthedocs/core/mixins.py
--- a/readthedocs/core/mixins.py
+++ b/readthedocs/core/mixins.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 """Common mixin classes for views."""
 
 from django.contrib.auth.mixins import LoginRequiredMixin
diff --git a/readthedocs/projects/forms.py b/readthedocs/projects/forms.py
--- a/readthedocs/projects/forms.py
+++ b/readthedocs/projects/forms.py
@@ -14,7 +14,6 @@
 from textclassifier.validators import ClassifierValidator
 
 from readthedocs.builds.constants import INTERNAL
-from readthedocs.core.mixins import HideProtectedLevelMixin
 from readthedocs.core.utils import slugify, trigger_build
 from readthedocs.core.utils.extend import SettingsOverrideObject
 from readthedocs.integrations.models import Integration
@@ -190,7 +189,7 @@ def clean_tags(self):
         return tags
 
 
-class ProjectAdvancedForm(HideProtectedLevelMixin, ProjectTriggerBuildMixin, ProjectForm):
+class ProjectAdvancedForm(ProjectTriggerBuildMixin, ProjectForm):
 
     """Advanced project option form."""
 
@@ -199,7 +198,6 @@ class Meta:
         per_project_settings = (
             'default_version',
             'default_branch',
-            'privacy_level',
             'analytics_code',
             'show_version_warning',
             'single_version',


Test patch:
diff --git a/readthedocs/api/v3/tests/test_projects.py b/readthedocs/api/v3/tests/test_projects.py
--- a/readthedocs/api/v3/tests/test_projects.py
+++ b/readthedocs/api/v3/tests/test_projects.py
@@ -131,7 +131,6 @@ def test_import_project(self):
         self.assertEqual(project.repo, 'https://github.com/rtfd/template')
         self.assertEqual(project.language, 'en')
         self.assertEqual(project.programming_language, 'py')
-        self.assertEqual(project.privacy_level, 'public')
         self.assertEqual(project.project_url, 'http://template.readthedocs.io/')
         self.assertIn(self.me, project.users.all())
         self.assertEqual(project.builds.count(), 1)
@@ -201,7 +200,6 @@ def test_update_project(self):
             'homepage': 'https://updated-homepage.org',
             'default_version': 'stable',
             'default_branch': 'updated-default-branch',
-            'privacy_level': 'private',
             'analytics_code': 'UA-XXXXXX',
             'show_version_warning': False,
             'single_version': True,
@@ -229,7 +227,6 @@ def test_update_project(self):
         self.assertEqual(self.project.project_url, 'https://updated-homepage.org')
         self.assertEqual(self.project.default_version, 'stable')
         self.assertEqual(self.project.default_branch, 'updated-default-branch')
-        self.assertEqual(self.project.privacy_level, 'public')
         self.assertEqual(self.project.analytics_code, 'UA-XXXXXX')
         self.assertEqual(self.project.show_version_warning, False)
         self.assertEqual(self.project.single_version, True)
diff --git a/readthedocs/rtd_tests/tests/test_project_forms.py b/readthedocs/rtd_tests/tests/test_project_forms.py
--- a/readthedocs/rtd_tests/tests/test_project_forms.py
+++ b/readthedocs/rtd_tests/tests/test_project_forms.py
@@ -1,4 +1,5 @@
 from unittest import mock
+
 from django.contrib.auth.models import User
 from django.test import TestCase
 from django.test.utils import override_settings
@@ -6,11 +7,10 @@
 from django_dynamic_fixture import get
 from textclassifier.validators import ClassifierValidator
 
-from readthedocs.builds.constants import LATEST, STABLE, EXTERNAL
+from readthedocs.builds.constants import EXTERNAL, LATEST, STABLE
 from readthedocs.builds.models import Version
 from readthedocs.projects.constants import (
     PRIVATE,
-    PRIVACY_CHOICES,
     PROTECTED,
     PUBLIC,
     REPO_TYPE_GIT,
@@ -274,28 +274,6 @@ def test_default_version_field_if_no_active_version(self):
         self.assertTrue(form.fields['default_version'].widget.attrs['readonly'])
         self.assertEqual(form.fields['default_version'].initial, 'latest')
 
-    def test_hide_protected_privacy_level_new_objects(self):
-        """
-        Test PROTECTED is only allowed in old objects.
-
-        New projects are not allowed to set the privacy level as protected.
-        """
-        # New default object
-        project = get(Project)
-        form = ProjectAdvancedForm(instance=project)
-
-        privacy_choices = list(PRIVACY_CHOICES)
-        privacy_choices.remove((PROTECTED, _('Protected')))
-        self.assertEqual(form.fields['privacy_level'].choices, privacy_choices)
-
-        # "Old" object with privacy_level previously set as protected
-        project = get(
-            Project,
-            privacy_level=PROTECTED,
-        )
-        form = ProjectAdvancedForm(instance=project)
-        self.assertEqual(form.fields['privacy_level'].choices, list(PRIVACY_CHOICES))
-
 
 class TestProjectAdvancedFormDefaultBranch(TestCase):