fix: open file in a+ to avoid read issues
This commit is contained in:
parent
80c987f383
commit
d698cf5478
@ -202,7 +202,7 @@ async function loadUserFile(path: string) {
|
|||||||
const realPath = resolve(path);
|
const realPath = resolve(path);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const handle = await open(realPath, 'r+');
|
const handle = await open(realPath, 'a+');
|
||||||
log.info('config', 'Using user database file at %s', realPath);
|
log.info('config', 'Using user database file at %s', realPath);
|
||||||
await handle.close();
|
await handle.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@ -105,3 +105,7 @@ oidc:
|
|||||||
# This should point to your publicly accessibly URL
|
# This should point to your publicly accessibly URL
|
||||||
# for your Headplane instance with /admin/oidc/callback
|
# for your Headplane instance with /admin/oidc/callback
|
||||||
redirect_uri: "http://localhost:3000/admin/oidc/callback"
|
redirect_uri: "http://localhost:3000/admin/oidc/callback"
|
||||||
|
|
||||||
|
# Stores the users and their permissions for Headplane
|
||||||
|
# This is a path to a JSON file, default is specified below.
|
||||||
|
user_storage_file: "/var/lib/headplane/users.json"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user