Skip to content

Commit 6aca352

Browse files
committed
Allow event managers to change live version
The corresponding API change had already happened, so this is just to make it easier than crafting the HTTP request directly! isaacphysics/isaac-api@eeba37e
1 parent d8ae57f commit 6aca352

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/components/pages/Admin.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
} from "../../state";
55
import {Link} from "react-router-dom";
66
import {RegisteredUserDTO} from "../../../IsaacApiTypes";
7-
import {EDITOR_COMPARE_URL, isAdmin, isDefined, isPhy, siteSpecific} from "../../services";
7+
import {EDITOR_COMPARE_URL, isAdmin, isAdminOrEventManager, isDefined, isPhy, siteSpecific} from "../../services";
88
import {TitleAndBreadcrumb} from "../elements/TitleAndBreadcrumb";
99
import classnames from "classnames";
1010
import {AnonymisationCheckboxes} from "../elements/AnonymisationCheckboxes";
@@ -99,7 +99,7 @@ export const Admin = ({user}: {user: RegisteredUserDTO}) => {
9999
<Button
100100
type="button" className={classNames("py-0", {"px-0 border-dark": isPhy})}
101101
onClick={startVersionUpdate}
102-
disabled={!isAdmin(user) || displayVersion === liveContentVersion}
102+
disabled={!isAdminOrEventManager(user) || displayVersion === liveContentVersion}
103103
>
104104
Set Version
105105
</Button>

0 commit comments

Comments
 (0)