Skip to content

Commit 2b5560a

Browse files
committed
chore: deprecate content library authorization rest apis and models
1 parent b968eed commit 2b5560a

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

openedx/core/djangoapps/content_libraries/models.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636

3737
import contextlib
3838
import logging
39-
from typing import ClassVar
4039
import uuid
40+
import warnings
41+
from typing import ClassVar
4142

4243
from django.contrib.auth import get_user_model
4344
from django.contrib.auth.models import Group
@@ -65,6 +66,15 @@
6566

6667
log = logging.getLogger(__name__)
6768

69+
70+
warnings.warn(
71+
(
72+
"ContentLibraryPermission model and related content library authorization "
73+
"APIs are deprecated. See https://github.com/openedx/openedx-platform/issues/37409."
74+
),
75+
DeprecationWarning
76+
)
77+
6878
User = get_user_model()
6979

7080

@@ -187,6 +197,8 @@ class ContentLibraryPermission(models.Model):
187197
"""
188198
Row recording permissions for a content library
189199
200+
Deprecated https://github.com/openedx/openedx-platform/issues/37409.
201+
190202
.. no_pii:
191203
"""
192204
library = models.ForeignKey(ContentLibrary, on_delete=models.CASCADE, related_name="permission_grants")

openedx/core/djangoapps/content_libraries/rest_api/libraries.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
import itertools
6666
import json
6767
import logging
68+
import warnings
6869

6970
import edx_api_doc_tools as apidocs
7071
from django.conf import settings
@@ -136,6 +137,15 @@
136137
log = logging.getLogger(__name__)
137138

138139

140+
warnings.warn(
141+
(
142+
"Content library team authorization REST APIs are deprecated. "
143+
"See https://github.com/openedx/openedx-platform/issues/37409."
144+
),
145+
DeprecationWarning
146+
)
147+
148+
139149
class LibraryApiPaginationDocs:
140150
"""
141151
API docs for query params related to paginating ContentLibraryMetadata objects.
@@ -323,6 +333,8 @@ class LibraryTeamView(APIView):
323333
324334
Note also the 'allow_public_' settings which can be edited by PATCHing the
325335
library itself (LibraryDetailsView.patch).
336+
337+
Deprecated https://github.com/openedx/openedx-platform/issues/37409
326338
"""
327339
@convert_exceptions
328340
def post(self, request, lib_key_str):
@@ -369,6 +381,8 @@ class LibraryTeamUserView(APIView):
369381
"""
370382
View to add/remove/edit an individual user's permissions for a content
371383
library.
384+
385+
Deprecated https://github.com/openedx/openedx-platform/issues/37409
372386
"""
373387
@convert_exceptions
374388
def put(self, request, lib_key_str, username):
@@ -422,6 +436,8 @@ def delete(self, request, lib_key_str, username):
422436
class LibraryTeamGroupView(APIView):
423437
"""
424438
View to add/remove/edit a group's permissions for a content library.
439+
440+
Deprecated https://github.com/openedx/openedx-platform/issues/37409
425441
"""
426442
@convert_exceptions
427443
def put(self, request, lib_key_str, group_name):

0 commit comments

Comments
 (0)