Commit Graph

13 Commits

Author SHA1 Message Date
Clinton Blackburn
2945b923d3 Updated _get_courses_with_access_type
- Return all courses for global staff without iteration
- Filter all courses on block type
2015-02-06 20:19:42 -05:00
Calen Pennington
b353ed2ea2 Better support specifying of modulestore configuration in test cases
The existing pattern of using `override_settings(MODULESTORE=...)` prevented
us from having more than one layer of subclassing in modulestore tests.

In a structure like:

    @override_settings(MODULESTORE=store_a)
    class BaseTestCase(ModuleStoreTestCase):
        def setUp(self):
            # use store

    @override_settings(MODULESTORE=store_b)
    class ChildTestCase(BaseTestCase):
        def setUp(self):
            # use store

In this case, the store actions performed in `BaseTestCase` on behalf of
`ChildTestCase` would still use `store_a`, even though the `ChildTestCase`
had specified to use `store_b`. This is because the `override_settings`
decorator would be the innermost wrapper around the `BaseTestCase.setUp` method,
no matter what `ChildTestCase` does.

To remedy this, we move the call to `override_settings` into the
`ModuleStoreTestCase.setUp` method, and use a cleanup to remove the override.
Subclasses can just defined the `MODULESTORE` class attribute to specify which
modulestore to use _for the entire `setUp` chain_.

[PLAT-419]
2015-02-04 09:09:14 -05:00
Andy Armstrong
356b2335e9 Add base support for cohorted group configurations
TNL-649
2014-12-05 09:52:26 -05:00
Clinton Blackburn
46d5593201 Merge pull request #6105 from edx/clintonb/oidc-administrator-claim
Added OAuth2 Permissions Scope Handler
2014-12-02 11:11:15 -05:00
Clinton Blackburn
5a561f81d4 Added OAuth2 Permissions Scope Handler
This scope offers a simple claim, administrator, that is true iff the user is a superuser.
2014-12-02 11:08:44 -05:00
Jesse Zoldak
bf3b87bc64 Clean up all modulestore testcases
Move modulestore config for tests to an importable location
Disable pylnt warning for lms imports in common tests
Refactor all testcases that loaded all xml courses
TE-610
TE-489
2014-12-02 07:09:36 -05:00
Carlos Andrés Rocha
1b858e5497 Merge pull request #5749 from rocha/cache-oauth2-handler-course-values
Cache user course privileges during OpenID Connect authorization.
2014-11-07 14:38:09 -05:00
Carlos Andrés Rocha
fac73e88d0 Cache user course privileges during OpenID Connect authorization. 2014-11-06 13:46:32 -05:00
muhammad-ammar
fcaa783e43 Unit Test Improvements
TE-489
2014-10-31 11:55:13 +00:00
Carlos Andrés Rocha
9cd26e551a List all courses during OAut2/OpenID Connect
Previously, only courses respective to the branded instance were returned.

AN-3610
2014-10-03 14:15:41 -04:00
Carlos Andrés Rocha
5500cc6816 Use default locale to OpenID profile claims.
If the user has not selected a default locale, then return the default one.
2014-09-22 15:19:40 -04:00
Carlos Andrés Rocha
19f95f0053 Return OpenID Connect user name from user profile. 2014-09-22 11:34:10 -04:00
Carlos Andrés Rocha
8857509b2d Add edX OAuth2 provider with OpenID Connect support 2014-09-17 11:36:06 -04:00