-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: list_forum_members-to-drf api to drf ( 14th ) #35366
base: master
Are you sure you want to change the base?
Conversation
if rolename == FORUM_ROLE_ADMINISTRATOR and not has_instructor_access: | ||
raise PermissionDenied("Operation requires instructor access.") | ||
|
||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of defaulting to True
I think it's better to default to false and have a check for each of the combinations we're okay with. I'm having a little bit of trouble understanding how the two checks are different. If you're already checking to see if the user is a FORUM_ROLE_ADMINSTATOR
do you care about whether or not that parameter is passed into the request?
issue
verify via postman
1: Try this URL with post request.
post-data =
rolename
:Group Moderator
or any other role.2: Valid data should be existed in
admin/django_comment_common/role/
table.expected result
{ "course_id": "course-v1:edx+cs222+2311", "Group Moderator": [ { "username": "login_service_user", "email": "[email protected]", "first_name": "", "last_name": "", "group_name": null } ], "division_scheme": "none" }
Verify from dashboard
1: Go to this page
2: User needs aleast two roles ( course-access-role as
staff
andAdministrator
as Forum Admin.