You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
permissions improvements for public courses (#701)
Fixed an issue where public courses were inaccessible to users.
Previously, when a course was marked as "public",
no security object was created for the CouchDB database, which in newer
versions of CouchDB defaults to admin-only access.
This prevented normal users from reading or writing to "public" course
databases.
## Solution Implemented
1. **Fixed Security Configuration**:
- Added proper security configuration for public courses by setting
empty members lists
- This allows all users to read/write documents in public course
databases
2. **Added Document Validation**:
- Created a validation function that allows any authenticated user to
create new documents
- Restricts modification of existing documents to only the original
author, course admins, and moderators
- Prevents vandalism while still allowing collaborative content
creation
3. **Code Organization Improvements**:
- Created a dedicated design-docs.ts file to centralize all design
documents
- Resolved circular dependencies between app.ts and
course-requests.ts
- Improved code maintainability by using consistent design document
handling
## Technical Details
- Added security object configuration for both public and private
courses
- Created a validation design document that implements "write-once"
permissions for regular users
- Special handling for course configuration and design documents
- Automated application of security settings to existing course
databases (`express` course-requests.ts)
0 commit comments