Skip to content

Commit 76b82e2

Browse files
committed
Allowed users
1 parent 157ee35 commit 76b82e2

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/pages/Perspective/component.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,7 @@ const Tools = ({
957957
const glottMode = columns.some(isMorphology) ? "morphology" : "swadesh";
958958
const glottMenu = columns.some(isMorphology) ? "Morphology distance" : "Glottochronology (Swadesh-Starostin)";
959959
const published = english_status === "Published" || english_status === "Limited access";
960+
const allowed_users = [1, 5, 180, 317];
960961

961962
return (
962963
<>
@@ -1012,25 +1013,24 @@ const Tools = ({
10121013
<Dropdown.Item onClick={() => openCognateAnalysisModal(id, `multi_${glottMode}`)}>
10131014
{getTranslation(`${glottMenu} multi-language`)}
10141015
</Dropdown.Item>
1015-
{ user_id === 1 && (
1016-
<>
1017-
<Dropdown.Item onClick={() => openCognateAnalysisModal(id, "neuro_suggestions")} disabled={!published}>
1018-
{getTranslation(
1019-
published
1020-
? "Neuro cognate suggestions"
1021-
: "Neuro cognate suggestions (disabled, perspective is not published)"
1022-
)}
1023-
</Dropdown.Item>
1024-
1025-
<Dropdown.Item onClick={() => openCognateAnalysisModal(id, "multi_neuro_suggestions")} disabled={!published}>
1026-
{getTranslation(
1027-
published
1028-
? "Neuro cognate multi-language suggestions"
1029-
: "Neuro cognate multi-language suggestions (disabled, perspective is not published)"
1030-
)}
1031-
</Dropdown.Item>
1032-
</>
1033-
)}
1016+
</>
1017+
{allowed_users.includes(user_id) && (
1018+
<>
1019+
<Dropdown.Item onClick={() => openCognateAnalysisModal(id, "neuro_suggestions")} disabled={!published}>
1020+
{getTranslation(
1021+
published
1022+
? "Neuro cognate suggestions"
1023+
: "Neuro cognate suggestions (disabled, perspective is not published)"
1024+
)}
1025+
</Dropdown.Item>
1026+
1027+
<Dropdown.Item onClick={() => openCognateAnalysisModal(id, "multi_neuro_suggestions")} disabled={!published}>
1028+
{getTranslation(
1029+
published
1030+
? "Neuro cognate multi-language suggestions"
1031+
: "Neuro cognate multi-language suggestions (disabled, perspective is not published)"
1032+
)}
1033+
</Dropdown.Item>
10341034
</>
10351035
)}
10361036

0 commit comments

Comments
 (0)