Skip to content

Commit

Permalink
properly allow admins to edit scene permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
sdumetz committed Feb 19, 2024
1 parent 44a7bc9 commit 365d970
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/ui/screens/SceneHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "../composants/Size";

import { nothing } from "lit-html";
import i18n from "../state/translate";
import {getLogin} from "../state/auth";
import { withUser } from "../state/auth";
import { navigate } from "../state/router";
import Modal from "../composants/Modal";
import { AccessType, Scene } from "state/withScenes";
Expand Down Expand Up @@ -78,7 +78,7 @@ class SceneVersion{
* Main UI view for the Voyager Explorer application.
*/
@customElement("scene-history")
export default class SceneHistory extends i18n(LitElement)
export default class SceneHistory extends withUser(i18n(LitElement))
{
@property()
name :string;
Expand Down Expand Up @@ -158,7 +158,7 @@ class SceneVersion{
}

can(a :AccessType) :boolean{
return AccessTypes.indexOf(a ) <= AccessTypes.indexOf(this.scene.access.user);
return AccessTypes.indexOf(a ) <= AccessTypes.indexOf(this.scene.access.user) || this.user?.isAdministrator;
}

aggregate(entries :ItemEntry[]) :SceneVersion[]{
Expand Down

0 comments on commit 365d970

Please sign in to comment.