mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
Rename admin local socket
This commit is contained in:
parent
2b376b9511
commit
c0f71f870e
@ -15,5 +15,5 @@
|
||||
"session_refresh_time": 18000,
|
||||
"localOnly": false,
|
||||
"enableLocalMode": true,
|
||||
"localModeSocketLocation": "/var/tmp/octo_local.socket"
|
||||
"localModeSocketLocation": "/var/tmp/focalboard_local.socket"
|
||||
}
|
||||
|
@ -12,5 +12,5 @@
|
||||
"session_refresh_time": 18000,
|
||||
"localOnly": false,
|
||||
"enableLocalMode": true,
|
||||
"localModeSocketLocation": "/var/tmp/octo_local.socket"
|
||||
"localModeSocketLocation": "/var/tmp/focalboard_local.socket"
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ if [[ $# < 2 ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl --unix-socket /var/tmp/octo_local.socket http://localhost/api/v1/admin/users/$1/password -X POST -H 'Content-Type: application/json' -d '{ "password": "'$2'" }'
|
||||
curl --unix-socket /var/tmp/focalboard_local.socket http://localhost/api/v1/admin/users/$1/password -X POST -H 'Content-Type: application/json' -d '{ "password": "'$2'" }'
|
||||
|
@ -47,7 +47,7 @@ func ReadConfigFile() (*Configuration, error) {
|
||||
viper.SetDefault("SessionRefreshTime", 60*60*5) // 5 minutes session refresh
|
||||
viper.SetDefault("LocalOnly", false)
|
||||
viper.SetDefault("EnableLocalMode", false)
|
||||
viper.SetDefault("LocalModeSocketLocation", "/var/tmp/octo_local.socket")
|
||||
viper.SetDefault("LocalModeSocketLocation", "/var/tmp/focalboard_local.socket")
|
||||
|
||||
err := viper.ReadInConfig() // Find and read the config file
|
||||
if err != nil { // Handle errors reading the config file
|
||||
|
@ -22,14 +22,14 @@ Personal Server settings are stored in `config.json` and is read when the server
|
||||
| session_refresh_time | Session refresh time in seconds | 18000
|
||||
| localOnly | Only allow connections from localhost | false
|
||||
| enableLocalMode | Enable Admin APIs on local Unix port | true
|
||||
| localModeSocketLocation | Location of local Unix port | "/var/tmp/octo_local.socket"
|
||||
| localModeSocketLocation | Location of local Unix port | "/var/tmp/focalboard_local.socket"
|
||||
|
||||
|
||||
## Resetting passwords
|
||||
|
||||
By default, Personal Server exposes admin APIs on a local Unix socket at `/var/tmp/octo_local.socket`. This is configurable by the `enableLocalMode` and `localModeSocketLocation` settings in config.json.
|
||||
By default, Personal Server exposes admin APIs on a local Unix socket at `/var/tmp/focalboard_local.socket`. This is configurable by the `enableLocalMode` and `localModeSocketLocation` settings in config.json.
|
||||
|
||||
To reset a user's password, you can use the follwing `reset-password.sh` script:
|
||||
To reset a user's password, you can use the following `reset-password.sh` script:
|
||||
|
||||
```
|
||||
#!/bin/bash
|
||||
@ -39,7 +39,7 @@ if [[ $# < 2 ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl --unix-socket /var/tmp/octo_local.socket http://localhost/api/v1/admin/users/$1/password -X POST -H 'Content-Type: application/json' -d '{ "password": "'$2'" }'
|
||||
curl --unix-socket /var/tmp/focalboard_local.socket http://localhost/api/v1/admin/users/$1/password -X POST -H 'Content-Type: application/json' -d '{ "password": "'$2'" }'
|
||||
```
|
||||
|
||||
After resetting a user's password (e.g. if they forgot it), direct them to change it from the user menu, by clicking on their username at the top of the side bar.
|
||||
|
Loading…
Reference in New Issue
Block a user