Allow non admins to login into the webadmin

This commit is contained in:
Johannes Zellner
2015-02-16 10:41:46 +01:00
parent 6cb256a538
commit bbb02ecee0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ $GNU_SED -e "s/^pid .*/pid \/tmp\/nginx.pid;/" -i "${NGINX_ROOT}/nginx.conf"
# add webadmin oauth client
readonly WEBADMIN_ID=abcdefg
readonly WEBADMIN_SCOPES="root,profile,users,apps,settings,roleAdmin"
readonly WEBADMIN_SCOPES="root,profile,users,apps,settings,roleUser"
sqlite3 "${DATA_DIR}/cloudron.sqlite" "INSERT OR REPLACE INTO clients (id, appId, clientSecret, redirectURI, scope) VALUES (\"cid-webadmin\", \"webadmin\", \"secret-webadmin\", \"https://${FQDN}\", \"${WEBADMIN_SCOPES}\")"
# start nginx
+1 -1
View File
@@ -193,7 +193,7 @@ sqlite3 "${cloudron_sqlite}" 'UPDATE apps SET installationState = "pending_resto
# Add webadmin oauth client
# The domain might have changed, therefor we have to update the record
echo "Add webadmin oauth cient"
ADMIN_SCOPES="root,profile,users,apps,settings,roleAdmin "
ADMIN_SCOPES="root,profile,users,apps,settings,roleUser"
sqlite3 "${cloudron_sqlite}" "INSERT OR REPLACE INTO clients (id, appId, clientSecret, redirectURI, scope) VALUES (\"cid-webadmin\", \"webadmin\", \"secret-webadmin\", \"${admin_origin}\", \"\$ADMIN_SCOPES\")"
EOF