Skip to content

Commit

Permalink
Merge branch 'master' of github.com:openedx/edx-enterprise into Mueez…
Browse files Browse the repository at this point in the history
…Khan/Remove-Degreed-Unencrypted-Columns-ENT8009
  • Loading branch information
MueezKhan246 committed Apr 24, 2024
2 parents 24cbab6 + d28e93f commit 2ec442e
Show file tree
Hide file tree
Showing 18 changed files with 125 additions and 460 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8']
toxenv: [quality, docs, django32-celery53, django42-celery53, django32-pii-annotations]
python-version:
- '3.8'
- '3.11'
toxenv: [quality, docs, django42-celery53, django42-pii-annotations]
env:
RUNJSHINT: true
steps:
Expand All @@ -26,7 +28,7 @@ jobs:
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/setup-node@v2
with:
Expand All @@ -37,11 +39,12 @@ jobs:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Run code coverage
if: matrix.python-version == '3.8' && matrix.toxenv == 'django42'
uses: codecov/codecov-action@v3
if: matrix.python-version == '3.8' && matrix.toxenv == 'django42-celery53'
uses: codecov/codecov-action@v4
with:
flags: unittests
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Run jshint
if: matrix.toxenv=='django42-celery53' # Only run this once as part of tests
run: |
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ Change Log
Unreleased
----------

[4.16.1]
---------
* fix: add enterprise audit reporting status in plotly auth token

[4.16.0]
---------
* feat: Adding python3.11 support. Dropped django32 support.

[4.15.12]
---------
* feat: update enterprise customer serializer to include active integration codes
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "4.15.12"
__version__ = "4.16.1"
14 changes: 14 additions & 0 deletions enterprise/api/v1/views/plotly_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from django.conf import settings
from django.http import JsonResponse

from enterprise.models import EnterpriseCustomer


class PlotlyAuthView(generics.GenericAPIView):
"""
Expand Down Expand Up @@ -41,8 +43,20 @@ def get(self, request, enterprise_uuid):

jwt_payload = dict({
'enterprise_uuid': enterprise_uuid,
'audit_data_reporting_enabled': self._is_audit_data_reporting_enabled(enterprise_uuid),
}, **CLAIMS)

token = jwt.encode(jwt_payload, secret_key, algorithm='HS512')
json_payload = {'token': token}
return JsonResponse(json_payload)

@staticmethod
def _is_audit_data_reporting_enabled(enterprise_uuid):
"""
Check if audit data reporting is enabled for the enterprise.
Args:
enterprise_uuid (str): UUID of the enterprise.
"""
enterprise = EnterpriseCustomer.objects.filter(uuid=enterprise_uuid).first()
return getattr(enterprise, 'enable_audit_data_reporting', False)
5 changes: 3 additions & 2 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.3.4
# Generated by edx-lint version: 5.3.6
# ------------------------------
[MASTER]
ignore = migrations
Expand Down Expand Up @@ -291,6 +291,7 @@ disable =
logging-format-interpolation,
no-member,
missing-timeout,
use-yield-from,

[REPORTS]
output-format = text
Expand Down Expand Up @@ -387,4 +388,4 @@ int-import-graph =
[EXCEPTIONS]
overgeneral-exceptions = builtins.Exception

# 852b6fff3b5db38083c340a20de6cc6024cc0c00
# 126dc53d1644a269339811dea1e20f5bd1bf3264
Loading

0 comments on commit 2ec442e

Please sign in to comment.