-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #863 from EsupPortail/develop
#3.3.0 - Import external video from url, youtube, peertube and BigBlueButton - Change xapi actor to deal with Moodle - Update template to BS5.3 and improve compliance for W3C - Use redis to cache session and improve logging - refactor of encoding/transcripting to move it in separate application - Fixbug on categories, recorder, user liste, tags cloud
- Loading branch information
Showing
249 changed files
with
9,287 additions
and
4,786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Before sending your pull request, make sure the following are done : | ||
|
||
* [ ] You have read our [contribution guidelines](https://github.com/EsupPortail/Esup-Pod/blob/master/CONTRIBUTING.md). | ||
* [ ] Your PR targets the `develop` branch. | ||
* [ ] The title of your PR starts with `[WIP]` or `[DONE]`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -441,7 +441,7 @@ def setUp(self): | |
print(" ---> SetUp of PopulatedShibTestCase: OK!") | ||
|
||
def _authenticate_shib_user(self, u): | ||
"""Simulate shibboleth header""" | ||
"""Simulate shibboleth header.""" | ||
fake_shib_header = { | ||
"REMOTE_USER": u["username"], | ||
self.hmap["username"]: u["username"], | ||
|
@@ -455,13 +455,13 @@ def _authenticate_shib_user(self, u): | |
fake_shib_header[self.hmap["affiliation"]] = u["affiliations"].split(";")[0] | ||
fake_shib_header[self.hmap["affiliations"]] = u["affiliations"] | ||
|
||
""" Get valid shib_meta from simulated shibboleth header """ | ||
"""Get valid shib_meta from simulated shibboleth header """ | ||
request = RequestFactory().get("/", REMOTE_USER=u["username"]) | ||
request.META.update(**fake_shib_header) | ||
shib_meta, error = shibmiddleware.ShibbMiddleware.parse_attributes(request) | ||
self.assertFalse(error, "Generating shibboleth attribute mapping contains errors") | ||
|
||
""" Check user authentication """ | ||
"""Check user authentication """ | ||
user = ShibbBackend.authenticate( | ||
ShibbBackend(), | ||
request=request, | ||
|
@@ -489,7 +489,7 @@ def test_make_profile(self): | |
self.assertEqual(user.first_name, "John") | ||
self.assertEqual(user.last_name, "Do") | ||
|
||
""" Test if user can be staff if SHIBBOLETH_STAFF_ALLOWED_DOMAINS is None """ | ||
"""Test if user can be staff if SHIBBOLETH_STAFF_ALLOWED_DOMAINS is None """ | ||
settings.SHIBBOLETH_STAFF_ALLOWED_DOMAINS = None | ||
reload(shibmiddleware) | ||
shibmiddleware.ShibbMiddleware.make_profile( | ||
|
@@ -500,7 +500,7 @@ def test_make_profile(self): | |
owner = Owner.objects.get(user__username="[email protected]") | ||
self.assertEqual(owner.affiliation, "teacher") | ||
|
||
""" Test if user can be staff when SHIBBOLETH_STAFF_ALLOWED_DOMAINS | ||
"""Test if user can be staff when SHIBBOLETH_STAFF_ALLOWED_DOMAINS | ||
is restricted """ | ||
settings.SHIBBOLETH_STAFF_ALLOWED_DOMAINS = ( | ||
"univ-a.fr", | ||
|
@@ -514,7 +514,7 @@ def test_make_profile(self): | |
) | ||
self.assertFalse(user.is_staff) | ||
|
||
""" Test if user become staff when SHIBBOLETH_STAFF_ALLOWED_DOMAINS | ||
"""Test if user become staff when SHIBBOLETH_STAFF_ALLOWED_DOMAINS | ||
is restrict and contains his domain """ | ||
settings.SHIBBOLETH_STAFF_ALLOWED_DOMAINS = ("univ.fr",) | ||
reload(shibmiddleware) | ||
|
@@ -523,7 +523,7 @@ def test_make_profile(self): | |
) | ||
self.assertTrue(user.is_staff) | ||
|
||
""" Test if same user with new unstaffable affiliation keep his staff status """ | ||
"""Test if same user with new unstaffable affiliation keep his staff status """ | ||
for a in UNSTAFFABLE_AFFILIATIONS: | ||
self.assertFalse(a in AFFILIATION_STAFF) | ||
user, shib_meta = self._authenticate_shib_user( | ||
|
@@ -540,12 +540,12 @@ def test_make_profile(self): | |
) | ||
self.assertTrue(user.is_staff) # Staff status is not remove | ||
|
||
""" Test if the main affiliation of this same user | ||
"""Test if the main affiliation of this same user | ||
with new unstaffable affiliation has changed """ | ||
owner = Owner.objects.get(user__username="[email protected]") | ||
self.assertEqual(owner.affiliation, "member") | ||
|
||
""" Test if a new user with same unstaffable affiliations has no staff status""" | ||
"""Test if a new user with same unstaffable affiliations has no staff status""" | ||
user, shib_meta = self._authenticate_shib_user( | ||
{ | ||
"username": "[email protected]", | ||
|
Oops, something went wrong.