Merge pull request #19204 from cpennington/fix-reve-68

Don't add the ContentGatingPartition to group_access in content_type_…
This commit is contained in:
Bessie Steinberg
2018-11-01 15:55:14 -04:00
committed by GitHub

View File

@@ -6,6 +6,9 @@ from django.conf import settings
from lms.djangoapps.courseware.field_overrides import FieldOverrideProvider, disable_overrides
from openedx.features.content_type_gating.partitions import CONTENT_GATING_PARTITION_ID
from openedx.features.course_duration_limits.config import (
CONTENT_TYPE_GATING_FLAG,
)
class ContentTypeGatingFieldOverride(FieldOverrideProvider):
@@ -15,6 +18,9 @@ class ContentTypeGatingFieldOverride(FieldOverrideProvider):
graded content to only be accessible to the Full Access group
"""
def get(self, block, name, default):
if not CONTENT_TYPE_GATING_FLAG.is_enabled():
return default
if name != 'group_access':
return default