mirror of
https://github.com/tale/headplane.git
synced 2026-08-30 16:59:56 +00:00
fix: we shouldn't return early if the env var isn't there
This commit is contained in:
+3
-3
@@ -299,8 +299,6 @@ async function hasAcl() {
|
|||||||
const config = await getConfig()
|
const config = await getConfig()
|
||||||
path = config.acl_policy_path
|
path = config.acl_policy_path
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!path) {
|
if (!path) {
|
||||||
@@ -311,7 +309,9 @@ async function hasAcl() {
|
|||||||
path = resolve(path)
|
path = resolve(path)
|
||||||
await access(path, constants.R_OK)
|
await access(path, constants.R_OK)
|
||||||
return true
|
return true
|
||||||
} catch {}
|
} catch (error) {
|
||||||
|
console.log('Cannot acquire read access to ACL file', error)
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user