musora-content-services 2.128.0 → 2.129.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.coderabbit.yaml +0 -0
- package/.editorconfig +0 -0
- package/.github/pull_request_template.md +0 -0
- package/.github/workflows/conventional-commits.yaml +0 -0
- package/.github/workflows/node.js.yml +0 -0
- package/.prettierignore +0 -0
- package/.prettierrc +0 -0
- package/CHANGELOG.md +8 -0
- package/jest.config.js +0 -0
- package/package.json +1 -1
- package/src/filterBuilder.js +3 -3
- package/src/infrastructure/http/executors/FetchRequestExecutor.ts +0 -0
- package/src/infrastructure/http/index.ts +0 -0
- package/src/infrastructure/http/interfaces/HeaderProvider.ts +0 -0
- package/src/infrastructure/http/interfaces/HttpError.ts +0 -0
- package/src/infrastructure/http/interfaces/NetworkError.ts +0 -0
- package/src/infrastructure/http/interfaces/RequestExecutor.ts +0 -0
- package/src/infrastructure/http/providers/DefaultHeaderProvider.ts +0 -0
- package/src/services/api/types.js +0 -0
- package/src/services/api/types.ts +0 -0
- package/src/services/content-org/content-org.js +0 -0
- package/src/services/content-org/playlists-types.js +0 -0
- package/src/services/eventsAPI.js +0 -0
- package/src/services/gamification/gamification.js +0 -0
- package/src/services/imageSRCBuilder.js +0 -0
- package/src/services/imageSRCVerify.js +0 -0
- package/src/services/permissions/PermissionsV2Adapter.ts +9 -11
- package/src/services/user/user-management-system.js +0 -0
- package/test/contentLikes.test.js +0 -0
- package/test/dataContext.test.js +0 -0
- package/test/imageSRCBuilder.test.js +0 -0
- package/test/imageSRCVerify.test.js +0 -0
- package/test/lib/lastUpdated.test.js +0 -0
- package/test/live/railcontentLive.test.js +0 -0
- package/test/localStorageMock.js +0 -0
- package/test/log.js +0 -0
- package/test/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
- package/test/mockData/mockData_progress_content.json +0 -0
- package/test/mockData/mockData_sanity_progress_content.json +0 -0
- package/test/mockData/mockData_user_practices.json +0 -0
- package/test/notifications.test.js +0 -0
- package/test/progressRows.test.js +0 -0
- package/test/streakMessage.test.js +0 -0
- package/test/user/permissions.test.js +0 -0
- package/test/userActivity.test.js +0 -0
- package/.claude/settings.local.json +0 -9
package/.coderabbit.yaml
CHANGED
|
File without changes
|
package/.editorconfig
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/.prettierignore
CHANGED
|
File without changes
|
package/.prettierrc
CHANGED
|
File without changes
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.129.0](https://github.com/railroadmedia/musora-content-services/compare/v2.126.0...v2.129.0) (2026-02-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* allows LP cards through on Your Progress section ([#745](https://github.com/railroadmedia/musora-content-services/issues/745)) ([5ed313a](https://github.com/railroadmedia/musora-content-services/commit/5ed313ac1db434856a2cd189793fa1137d18d384))
|
|
11
|
+
* **BEH-1514:** badge rear ([#756](https://github.com/railroadmedia/musora-content-services/issues/756)) ([201ccea](https://github.com/railroadmedia/musora-content-services/commit/201cceaced4607e085b6504761bc376deaee8f0b))
|
|
12
|
+
|
|
5
13
|
## [2.128.0](https://github.com/railroadmedia/musora-content-services/compare/v2.127.0...v2.128.0) (2026-01-31)
|
|
6
14
|
|
|
7
15
|
|
package/jest.config.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/filterBuilder.js
CHANGED
|
@@ -58,7 +58,7 @@ export class FilterBuilder {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
async buildFilter() {
|
|
61
|
-
if (this.bypassPermissions) {
|
|
61
|
+
if (this.bypassPermissions && !this.showOnlyOwnedContent) {
|
|
62
62
|
this.userData = { permissions: [], isAdmin: false }
|
|
63
63
|
} else {
|
|
64
64
|
const adapter = getPermissionsAdapter()
|
|
@@ -134,10 +134,10 @@ export class FilterBuilder {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
_applyPermissions() {
|
|
137
|
-
if (this.bypassPermissions) return this
|
|
137
|
+
if (this.bypassPermissions && !this.showOnlyOwnedContent) return this
|
|
138
138
|
const adapter = getPermissionsAdapter()
|
|
139
139
|
// Check if admin (admins bypass permissions)
|
|
140
|
-
if (adapter.isAdmin(this.userData)) return this
|
|
140
|
+
if (adapter.isAdmin(this.userData) && !this.showOnlyOwnedContent) return this
|
|
141
141
|
|
|
142
142
|
// Generate permissions filter using adapter
|
|
143
143
|
const permissionsFilter = adapter.generatePermissionsFilter(this.userData, {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -98,29 +98,27 @@ export class PermissionsV2Adapter extends PermissionsAdapter {
|
|
|
98
98
|
showOnlyOwnedContent = false,
|
|
99
99
|
} = options
|
|
100
100
|
|
|
101
|
-
// Admins bypass permission filter
|
|
102
|
-
if (this.isAdmin(userPermissions)) {
|
|
103
|
-
return null
|
|
104
|
-
}
|
|
105
|
-
|
|
106
101
|
// If showOnlyOwnedContent, show only purchased/owned content
|
|
107
102
|
if (showOnlyOwnedContent) {
|
|
108
103
|
return this.buildOwnedContentFilter(userPermissions)
|
|
109
104
|
}
|
|
110
105
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// If showing membership restricted content
|
|
115
|
-
if (showMembershipRestrictedContent) {
|
|
116
|
-
return ` ${prefix}membership_tier in ${arrayToStringRepresentation([plusMembershipTier, basicMembershipTier])} `
|
|
106
|
+
// Admins bypass permission filter
|
|
107
|
+
if (this.isAdmin(userPermissions)) {
|
|
108
|
+
return null
|
|
117
109
|
}
|
|
118
110
|
|
|
111
|
+
let userPermissionIds = this.getUserPermissionIds(userPermissions)
|
|
112
|
+
const isDereferencedContext = prefix === '@->'
|
|
119
113
|
const filter = this.buildStandardPermissionFilter(
|
|
120
114
|
userPermissionIds,
|
|
121
115
|
prefix,
|
|
122
116
|
isDereferencedContext
|
|
123
117
|
)
|
|
118
|
+
// If showing membership restricted content
|
|
119
|
+
if (showMembershipRestrictedContent) {
|
|
120
|
+
return ` (${prefix}membership_tier in ${arrayToStringRepresentation([plusMembershipTier, basicMembershipTier])} || ${filter} )`
|
|
121
|
+
}
|
|
124
122
|
|
|
125
123
|
return filter
|
|
126
124
|
}
|
|
File without changes
|
|
File without changes
|
package/test/dataContext.test.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/localStorageMock.js
CHANGED
|
File without changes
|
package/test/log.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|