admin avatar added
parent
358004899b
commit
92c5828b33
9
dd-ctl
9
dd-ctl
|
@ -327,6 +327,7 @@ down(){
|
|||
|
||||
setup_nextcloud(){
|
||||
echo " --> Applying custom settings in nextcloud"
|
||||
cp "$CUSTOM_PATH/custom/avatars/dd" "$DATA_FOLDER/avatars/master-avatars/"
|
||||
# docker exec -u www-data dd-apps-nextcloud-app sh -c 'export OC_PASS=$DDADMIN_PASSWORD && php occ user:add --password-from-env --display-name="DD Admin" --group="admin" $DDADMIN_USER'
|
||||
|
||||
# docker exec -u www-data dd-apps-nextcloud-app sh -c 'export OC_PASS=admin && php occ user:delete admin'
|
||||
|
@ -996,11 +997,11 @@ case "$OPERATION" in
|
|||
update_logos_and_menu
|
||||
;;
|
||||
customize)
|
||||
up
|
||||
wait_for_moodle
|
||||
#up
|
||||
#wait_for_moodle
|
||||
setup_nextcloud
|
||||
setup_wordpress
|
||||
setup_moodle
|
||||
#setup_wordpress
|
||||
#setup_moodle
|
||||
;;
|
||||
down)
|
||||
down
|
||||
|
|
|
@ -49,8 +49,11 @@ def setup_avatar_views(app: "ApiFlaskApp") -> None:
|
|||
# TODO: check if this is redundant and remove it
|
||||
@app.route("/avatar/<username>", methods=["GET"])
|
||||
def avatar(username: str) -> Response:
|
||||
file = 'dd'
|
||||
if username != 'admin':
|
||||
file = avatars.get_user_avatar(username)
|
||||
return send_from_directory(
|
||||
os.path.join(app.root_path, "../avatars/master-avatars/"),
|
||||
avatars.get_user_avatar(username),
|
||||
file,
|
||||
mimetype="image/jpg",
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue