@axium/storage 0.11.0 → 0.11.2
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/dist/server/api.js
CHANGED
|
@@ -135,7 +135,14 @@ function existsInACL(column, user) {
|
|
|
135
135
|
.selectFrom('acl.storage')
|
|
136
136
|
.whereRef('itemId', '=', `item.${column}`)
|
|
137
137
|
.where('userId', '=', user.id)
|
|
138
|
-
.where(eb =>
|
|
138
|
+
.where(eb => {
|
|
139
|
+
const ors = [eb('userId', '=', user.id)];
|
|
140
|
+
if (user.roles.length)
|
|
141
|
+
ors.push(eb('role', 'in', user.roles));
|
|
142
|
+
if (user.tags.length)
|
|
143
|
+
ors.push(eb('tag', 'in', user.tags));
|
|
144
|
+
return eb.or(ors);
|
|
145
|
+
}));
|
|
139
146
|
}
|
|
140
147
|
addRoute({
|
|
141
148
|
path: '/api/users/:id/storage/shared',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axium/storage",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"author": "James Prevett <axium@jamespre.dev>",
|
|
5
5
|
"description": "User file storage for Axium",
|
|
6
6
|
"funding": {
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"name": "Files",
|
|
67
67
|
"icon": "folders"
|
|
68
68
|
}
|
|
69
|
-
]
|
|
69
|
+
],
|
|
70
|
+
"update_checks": true
|
|
70
71
|
}
|
|
71
72
|
}
|