Skip to content

MA-199 Course Authorization framework in mobile API - #6398

Merged
nasthagiri merged 1 commit into
masterfrom
mobile/MA-199
Jan 8, 2015
Merged

MA-199 Course Authorization framework in mobile API#6398
nasthagiri merged 1 commit into
masterfrom
mobile/MA-199

Conversation

@nasthagiri

Copy link
Copy Markdown
Contributor

Please review. @aleffert @BenjiLee

@nasthagiri
nasthagiri force-pushed the mobile/MA-199 branch 8 times, most recently from 6835837 to 41ba3b2 Compare January 5, 2015 16:57
Comment thread lms/djangoapps/courseware/access.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a way we can make the names more obvious. Since it's not just enrollment, it's also beta users though IIRC I had the same problem and didn't come up with anything good.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The can_load_mobile method checks enrollment in addition to the other checks.
The can_load_mobile_not_enrolled method does not check enrollment, but checks release date, beta user, and eventually cohorted content (once supported).

How about can_load_mobile and can_load_mobile_no_enrollment_check?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed load_mobile_not_enrolled -> load_mobile_no_enrollment_check in latest commit.

@aleffert

aleffert commented Jan 5, 2015

Copy link
Copy Markdown
Contributor

That's all from me.

Comment thread lms/djangoapps/mobile_api/tests.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate imports.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Thanks. I'm surprised pylint doesn't raise this issue.

@nasthagiri

Copy link
Copy Markdown
Contributor Author

@BenjiLee @aleffert I believe I have addressed all your comments. Please see the latest commit edx@a221727.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More unused imports:
from rest_framework import permissions
from rest_framework.authentication import OAuth2Authentication, SessionAuthentication

from opaque_keys.edx.keys import CourseKey
from xmodule.modulestore.django import modulestore

@aleffert

aleffert commented Jan 7, 2015

Copy link
Copy Markdown
Contributor

👍

Comment thread lms/djangoapps/mobile_api/testutils.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logout*

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@BenjiLee

BenjiLee commented Jan 7, 2015

Copy link
Copy Markdown
Contributor

👍

nasthagiri added a commit that referenced this pull request Jan 8, 2015
MA-199 Course Authorization framework in mobile API
@nasthagiri
nasthagiri merged commit 3c274e2 into master Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants