-
Notifications
You must be signed in to change notification settings - Fork 8
feat: Add Default Permissions to Boosts #898
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
Conversation
🦋 Changeset detectedLatest commit: cb32b5e The changes in this PR will be included in the next version bump. This PR includes changesets to release 46 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for staging-learncardapp canceled.
|
✅ Deploy Preview for learncarddocs canceled.
|
|
👋 Hey there! It looks like you modified code, but didn't update the documentation in If this PR introduces new features, changes APIs, or modifies behavior that users or developers need to know about, please consider updating the docs. 🏄 Windsurf TipYou can ask Windsurf to help:
Windsurf will review your changes and suggest appropriate documentation updates based on what was modified. 📚 Documentation Guide
This is an automated reminder. If no docs are needed, feel free to ignore this message. |
…my/LearnCard into default-permissions-boosts
|
@claude please review and provide a recommendation for merging |
|
Claude finished @Custard7's task —— View job Code Review Complete ✅Review Tasks
Review Summary✅ RECOMMENDATION: APPROVED FOR MERGEThis is a well-implemented feature that adds significant value to the LearnCard platform while maintaining security and code quality standards. Strengths🏗️ Solid Architecture
🔒 Security-First Design
🧪 Comprehensive Testing
📚 Excellent Documentation
🎯 Value-Added Feature
Technical Details Verified
Minor Notes
This PR represents high-quality software development and is ready for production deployment. |
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.
✨ PR Review
LGTM
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how
|
This PR is missing a Jira ticket reference in the title or description. |
|
@claude please re-review and provide a recommendation for merging |
|
Claude finished @Custard7's task —— View job Re-reviewing PR: Default Permissions for Boosts ✅Review Tasks
✅ RECOMMENDATION: APPROVED FOR MERGEThis is a well-implemented feature that adds significant value to the LearnCard platform while maintaining security and code quality standards. Strengths🏗️ Solid Architecture
🔒 Security-First Design
🧪 Comprehensive Testing
📚 Excellent Documentation
🎯 Value-Added Feature
Technical Details Verified
Code Quality Highlights
Minor Observations
This PR represents high-quality software development with thorough testing, clear documentation, and solid architectural decisions. The feature enables valuable new use cases while maintaining security and backward compatibility. |
|
🥷 Code experts: TaylorBeeston Custard7, TaylorBeeston have most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: ✨ Comment |
feat: Add
defaultPermissionsfor BoostsSummary
This PR implements
defaultPermissionsfor Boosts, allowing boost creators to grant permissions to all authenticated users without explicitly assigning roles. This enables use cases like community badges where anyone can issue credentials.Changes
Core Implementation
packages/learn-card-types/src/lcn.ts- AddeddefaultPermissionsfield toBoostValidatorservices/learn-card-network/brain-service/src/models/Boost.ts- AddeddefaultRolerelationship to Boost modelservices/learn-card-network/brain-service/src/accesslayer/role/relationships/create.ts- AddedaddDefaultPermissionsForBoostfunctionservices/learn-card-network/brain-service/src/accesslayer/role/relationships/update.ts- CreatedupdateDefaultPermissionsForBoostandremoveDefaultPermissionsForBoostfunctionsdefaultPermissionshandling tocreateBoost,createChildBoost, andupdateBoostroutesPermission System Refactor
Refactored the permission system to integrate
defaultPermissionsinto the central getBoostPermissions function:defaultRoleand uses it as the base permissionsNetwork Plugin
packages/plugins/learn-card-network/src/plugin.ts- UpdatedcreateBoostandcreateChildBoostto passdefaultPermissionsthrough metadataTests
Added comprehensive test coverage in services/learn-card-network/brain-service/test/default-permissions.spec.ts:
defaultPermissionsdefaultPermissions.canIssuedefaultPermissions.canEditcanRevoke,canManagePermissions,canViewAnalytics)defaultPermissionson existing boostsDocumentation
Usage
Supported Permissions
canIssuecanEditcanRevokecanManagePermissionscanViewAnalyticsTesting
All 994 tests pass, including 35 new tests for
defaultPermissions.How to Test this PR:
pnpm installcompleted at repo root1: Run Automated Tests
Expected: All tests pass.
2: Manual Testing via CLI
Step 0: Start Services
Step 1: Start the LearnCard CLI
Terminal
Step 2: Create Profiles
User A:
User B
Step 3: Create a Boost with
defaultPermissions(User A)Step 4: Verify User B Can See Permissions
Step 5: Verify User B Can Issue
What to Verify
canIssue: true,canViewAnalytics: trueUNAUTHORIZEDerror)defaultPermissionscanIssue: falseand sendBoost fails✨ PR Description
Purpose: Add defaultPermissions field to Boosts to grant permissions to all authenticated users without explicit role assignment, enabling open collaboration and community-driven credential issuance.
Main changes:
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how