Repository navigation
Conversation
…lity - Updated `RestAPI` to allow access to non-published posts based on enrollment status. - Improved `REST_Rating` to reflect UI access rules for course ratings, including handling guest users and their ratings. - Added a new method `can_read_course_rating` to encapsulate logic for determining if a user can read course ratings based on course status and user authentication. - Enhanced `RestAuth` to clarify access permissions for course content, ensuring that enrollment alone does not grant access to non-published content.
- Revised the description to specify that the endpoint retrieves ratings for a course, not just published courses. - Clarified authentication requirements for public and private courses, including access conditions for enrolled users. - Enhanced the response structure to include the user's own rating details when available, improving the API's usability.
- Improved the `has_qna_access` method in `Q_And_A` class to enforce course content rules, ensuring students can only access Q&A for published or private courses. - Updated `RestAPI` to change permission callbacks from `__return_true` to `permission_optional_access_token`, enhancing security and access control for course-related endpoints. - Revised API documentation to reflect the new permission handling and clarify authentication requirements for public and private courses.
saadman30
marked this pull request as ready for review
October 23, 2026 09:14
- Introduced `showCopyFeedback` function to provide user feedback via toast notifications or tooltips when copying and pasting text. - Updated clipboard copy and paste logic to utilize the new feedback mechanism, improving user experience. - Enhanced error handling for clipboard operations, ensuring users receive appropriate messages for success or failure scenarios.
saadman30
marked this pull request as draft
October 23, 2026 10:40
- Removed redundant checks and streamlined the logic to determine user access to Q&A based on course visibility. - Simplified the method by eliminating unnecessary variable assignments and conditions, enhancing code readability and maintainability. - Updated comments to reflect the current functionality and clarify access rules for Q&A based on course status.
Co-authored-by: Cursor <cursoragent@cursor.com>
saadman30
marked this pull request as ready for review
October 23, 2026 11:12
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RestAPIto allow access to non-published posts based on enrollment status.REST_Ratingto reflect UI access rules for course ratings, including handling guest users and their ratings.can_read_course_ratingto encapsulate logic for determining if a user can read course ratings based on course status and user authentication.RestAuthto clarify access permissions for course content, ensuring that enrollment alone does not grant access to non-published content.