mirror of
https://github.com/YunoHost-Apps/duniter_ynh.git
synced 2024-09-03 18:26:35 +02:00
[enh] #12, grant access to the graphical interface only to the admin.
- install, upgrade: protect the path and grant access to admin user. - upgrade: forget to comment unused sed. - Update readme: add information about webadmin on root path.
This commit is contained in:
parent
2b091dc805
commit
bad29ef90e
3 changed files with 11 additions and 7 deletions
|
@ -7,6 +7,10 @@
|
|||
|
||||
## Install
|
||||
|
||||
- Web admin can only be installed on root path for now.
|
||||
Use a domain name like `duniter.domain.tld` for instance.
|
||||
See [#18](https://github.com/duniter/duniter_ynh/issues/18) for more details.
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/duniter/duniter_ynh
|
||||
```
|
||||
|
|
|
@ -81,13 +81,13 @@ sudo $app webstart
|
|||
sudo yunohost service add $app --log /home/admin/.config/$app/"$app"_default/"$app".log
|
||||
|
||||
# Add admin to the allowed users
|
||||
#sudo yunohost app addaccess $app -u $admin
|
||||
sudo yunohost app addaccess $app -u $admin
|
||||
|
||||
# Allow only allowed users to access admin panel
|
||||
#ynh_app_setting_set "$app" protected_uris "/"
|
||||
ynh_app_setting_set "$app" protected_uris "/"
|
||||
|
||||
# SSOwat Configuration
|
||||
ynh_app_setting_set "$app" unprotected_uris "/" # "api/"
|
||||
#ynh_app_setting_set "$app" unprotected_uris "/api/"
|
||||
|
||||
# Configure Nginx
|
||||
nginx_conf="../conf/nginx.conf"
|
||||
|
|
|
@ -39,17 +39,17 @@ sudo $app webstart
|
|||
path=${path%/}
|
||||
|
||||
# Add admin to the allowed users
|
||||
#sudo yunohost app addaccess $app -u $admin
|
||||
sudo yunohost app addaccess $app -u $admin
|
||||
|
||||
# Allow only allowed users to access admin panel
|
||||
#ynh_app_setting_set "$app" protected_uris "/"
|
||||
ynh_app_setting_set "$app" protected_uris "/"
|
||||
|
||||
# SSOwat Configuration
|
||||
ynh_app_setting_set "$app" unprotected_uris "/" # "api/"
|
||||
#ynh_app_setting_set "$app" unprotected_uris "/api/"
|
||||
|
||||
# Upgrade Nginx configuration
|
||||
nginx_conf="../conf/nginx.conf"
|
||||
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" $nginx_conf
|
||||
#sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" $nginx_conf
|
||||
sudo sed -i "s@YNH_EXAMPLE_PORT@$port@" $nginx_conf
|
||||
sudo sed -i "s@YNH_EXAMPLE_DOMAIN@$domain@" $nginx_conf
|
||||
sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
|
Loading…
Add table
Reference in a new issue