Explorar o código

fix(ManageStation): Unable to open public station view queue if user does not directly have permission

Owen Diffey hai 1 ano
pai
achega
84da376913
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      frontend/src/components/modals/ManageStation/index.vue

+ 7 - 1
frontend/src/components/modals/ManageStation/index.vue

@@ -110,7 +110,13 @@ const findTabOrClose = () => {
 	if (canRequest()) return showTab("request");
 	if (hasPermission("stations.autofill")) return showTab("autofill");
 	if (hasPermission("stations.blacklist")) return showTab("blacklist");
-	if (!(sector.value === "home" && hasPermission("stations.view")))
+	if (
+		!(
+			sector.value === "home" &&
+			(hasPermission("stations.view") ||
+				station.value.privacy === "public")
+		)
+	)
 		return closeCurrentModal();
 	return null;
 };