chore: root collection auth issue and ui update
This commit is contained in:
@@ -249,7 +249,7 @@
|
|||||||
:icon="masking && header.source === 'auth' ? IconEye : IconEyeOff"
|
:icon="masking && header.source === 'auth' ? IconEye : IconEyeOff"
|
||||||
@click="toggleMask()"
|
@click="toggleMask()"
|
||||||
/>
|
/>
|
||||||
<span class="aspect-square w-[2.05rem]"></span>
|
<span v-else class="aspect-square w-[2.05rem]"></span>
|
||||||
<span>
|
<span>
|
||||||
<HoppButtonSecondary
|
<HoppButtonSecondary
|
||||||
v-tippy="{ theme: 'tooltip' }"
|
v-tippy="{ theme: 'tooltip' }"
|
||||||
|
|||||||
@@ -102,14 +102,25 @@ export function cascaseParentCollectionForHeaderAuth(
|
|||||||
|
|
||||||
const isRootCollection = path.length === 1
|
const isRootCollection = path.length === 1
|
||||||
|
|
||||||
// Check if authType is not 'inherit'
|
if (parentFolderAuth?.authType === "inherit" && isRootCollection) {
|
||||||
if (parentFolderAuth?.authType !== "inherit" || isRootCollection) {
|
auth = {
|
||||||
|
parentID: parentFolder.id ?? folderPath,
|
||||||
|
parentName: parentFolder.name,
|
||||||
|
inheritedAuth: {
|
||||||
|
authType: "none",
|
||||||
|
authActive: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parentFolderAuth?.authType !== "inherit") {
|
||||||
auth = {
|
auth = {
|
||||||
parentID: parentFolder.id ?? folderPath,
|
parentID: parentFolder.id ?? folderPath,
|
||||||
parentName: parentFolder.name,
|
parentName: parentFolder.name,
|
||||||
inheritedAuth: parentFolderAuth,
|
inheritedAuth: parentFolderAuth,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update headers, overwriting duplicates by key
|
// Update headers, overwriting duplicates by key
|
||||||
if (parentFolderHeaders) {
|
if (parentFolderHeaders) {
|
||||||
const activeHeaders = parentFolderHeaders.filter((h) => h.active)
|
const activeHeaders = parentFolderHeaders.filter((h) => h.active)
|
||||||
|
|||||||
Reference in New Issue
Block a user