From a738ed91e642b7014f8de0e8b0956ebeb2f2b0b7 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Fri, 6 Jan 2023 03:22:02 +0000 Subject: [PATCH] updated readme message to warn about the academy id on the querysintr --- src/js/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/index.js b/src/js/index.js index 13373bb..58cd28f 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -33,7 +33,8 @@ const Main = injectContent(() => { const sortedDays = store.days.sort((a, b) => (a.position < b.position ? -1 : 1)); const notInfoEmpty = key => store.info[key] && store.info[key] !== undefined && store.info[key] != ""; - const readOnly = store.info?.academy_author != params.get("academy"); + const academyFromUrl = params.get("academy"); + const readOnly = (!academyFromUrl && typeof academyFromUrl == undefined) || store.info?.academy_author != params.get("academy"); useEffect(() => { actions.getMe(); @@ -88,7 +89,10 @@ const Main = injectContent(() => { {readOnly ? ( -
You cannot update this syllabus, read only mode is active.
+
+ {!academyFromUrl &&

Please specify your academy id on the URL QueryString.

} + You cannot update this syllabus, read only mode is active. +
) : (
)}