Compare commits
No commits in common. "a9e610a82c3bb128876372f30e042fa8de1250e9" and "99c10cf394116c6d9631e067e69e0d4cad7bc93a" have entirely different histories.
a9e610a82c
...
99c10cf394
|
@ -190,7 +190,7 @@
|
|||
</li>
|
||||
|
||||
<li
|
||||
v-if="user?.role === 'admin' || user?.role === 'editor'"
|
||||
v-if="user?.role === 'admin'"
|
||||
v-close-popper
|
||||
class="menu-item"
|
||||
>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "traxxx-web",
|
||||
"version": "0.36.1",
|
||||
"version": "0.36.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "0.36.1",
|
||||
"version": "0.36.0",
|
||||
"dependencies": {
|
||||
"@brillout/json-serializer": "^0.5.8",
|
||||
"@dicebear/collection": "^7.0.5",
|
||||
|
|
|
@ -80,5 +80,5 @@
|
|||
"postcss-custom-media": "^10.0.2",
|
||||
"postcss-nesting": "^12.0.2"
|
||||
},
|
||||
"version": "0.36.1"
|
||||
"version": "0.36.0"
|
||||
}
|
||||
|
|
|
@ -640,12 +640,12 @@ export async function fetchSceneRevisions(revisionId, filters = {}, reqUser) {
|
|||
.leftJoin('users', 'users.id', 'scenes_revisions.user_id')
|
||||
.leftJoin('users as reviewers', 'reviewers.id', 'scenes_revisions.reviewed_by')
|
||||
.modify((builder) => {
|
||||
if (!['admin', 'editor'].includes(reqUser?.role) && !filters.userId && !filters.sceneId) {
|
||||
if (reqUser?.role !== 'admin' && !filters.userId && !filters.sceneId) {
|
||||
builder.where('user_id', reqUser.id);
|
||||
}
|
||||
|
||||
if (filters.userId) {
|
||||
if (!['admin', 'editor'].includes(reqUser?.role) && filters.userId !== reqUser.id) {
|
||||
if (reqUser?.role !== 'admin' && filters.userId !== reqUser.id) {
|
||||
throw new HttpError('You are not permitted to view revisions from other users.', 403);
|
||||
}
|
||||
|
||||
|
@ -661,6 +661,8 @@ export async function fetchSceneRevisions(revisionId, filters = {}, reqUser) {
|
|||
builder.where('scenes_revisions.scene_id', filters.sceneId);
|
||||
}
|
||||
|
||||
console.log(filters);
|
||||
|
||||
if (filters.isFinalized === false) {
|
||||
builder.whereNull('approved');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue