Description
When authz is enabled, Studio is sending validate/me requests for course-scoped permissions from pages where there is no course scope available yet.
For example, from Studio home, before opening a course outline, validate/me is being called for permissions that appear to be related to course outline actions, such as:
{
"action": "courses.manage_advanced_settings"
}
However, this request is being sent from a generic Studio page where no course scope is attached yet. The request fails because the payload includes a permission that requires a scope, but the request does not include one:
{
"scope": ["This field is required."]
}
Steps to reproduce
- Enable
authz.enable_course_authoring.
- Log in to Studio.
- Go to Studio home.
- Do not open any course yet.
- Open the browser dev tools.
- Check the network requests.
- Look for calls to validate/me.
- Review the request payload and response.
Expected behavior
Studio should only send course-scoped permission validation requests when the related course scope is available.
Permissions related to course outline or course-level actions should not be validated from (generic?) Studio pages before a course is loaded.
Actual behavior
Studio sends a validate/me request from Studio home for a course-scoped action. The request payload includes:
{
"action": "courses.manage_advanced_settings"
}
The response returns a scope validation error:
{
"scope": ["This field is required."]
}
Description
When authz is enabled, Studio is sending validate/me requests for course-scoped permissions from pages where there is no course scope available yet.
For example, from Studio home, before opening a course outline, validate/me is being called for permissions that appear to be related to course outline actions, such as:
However, this request is being sent from a generic Studio page where no course scope is attached yet. The request fails because the payload includes a permission that requires a scope, but the request does not include one:
Steps to reproduce
authz.enable_course_authoring.Expected behavior
Studio should only send course-scoped permission validation requests when the related course scope is available.
Permissions related to course outline or course-level actions should not be validated from (generic?) Studio pages before a course is loaded.
Actual behavior
Studio sends a validate/me request from Studio home for a course-scoped action. The request payload includes:
The response returns a scope validation error: