@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.
@@ -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 => eb.or([eb('userId', '=', user.id), eb('role', 'in', user.roles), eb('tag', 'in', user.tags)])));
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.0",
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
  }
@@ -33,6 +33,6 @@
33
33
 
34
34
  <style>
35
35
  .list-item {
36
- grid-template-columns: 1em 4fr 15em 5em !important;
36
+ grid-template-columns: 1em 4fr 15em 5em;
37
37
  }
38
38
  </style>