From 947ab155d27dec4d2cea87126fd14c1a2e9cd055 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Fri, 17 May 2024 21:16:11 +0000 Subject: [PATCH 1/3] Update docker-compose for local dev --- docker-compose.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e8b29391..394b6389 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: - ./media:/media - static:/static ports: - - "127.0.0.1:8890:${PORTAL_PORT}" + - "8890:${PORTAL_PORT}" entrypoint: ["python3", "manage.py"] command: ["runserver", "0.0.0.0:${PORTAL_PORT}"] depends_on: @@ -23,7 +23,7 @@ services: referenceapi: image: docker.chameleoncloud.org/referenceapi:latest ports: - - "127.0.0.1:8891:8000" + - "8891:8000" mysql: image: mariadb:10 volumes: @@ -39,11 +39,11 @@ services: MYSQL_USER: ${DB_USER} MYSQL_PASSWORD: ${DB_PASSWORD} ports: - - "127.0.0.1:3306:3306" + - "3306:3306" phpmyadmin: image: phpmyadmin/phpmyadmin ports: - - "127.0.0.1:8889:80" + - "8889:80" environment: - PMA_HOST=mysql - PMA_PORT=3306 @@ -71,12 +71,12 @@ services: volumes: - .:/project ports: - - "127.0.0.1:9000:9000" + - "9000:9000" mail: image: mailhog/mailhog:latest restart: always ports: - - "127.0.0.1:8025:8025" + - "8025:8025" volumes: static: From 593adfafa7cf538dcb0b070e6b686f094a57f0b3 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Mon, 20 May 2024 19:33:51 +0000 Subject: [PATCH 2/3] Update sample env --- .env.sample | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.env.sample b/.env.sample index 1c64df27..3d338311 100644 --- a/.env.sample +++ b/.env.sample @@ -68,16 +68,17 @@ DEFAULT_FROM_EMAIL=no-reply@chameleoncloud.org # Trovi ZENODO_URL=https://sandbox.zenodo.org ARTIFACT_SHARING_JUPYTERHUB_URL=http://localhost:8001 +TROVI_API_BASE_URL=http://chameleon.local:8808 # Allocations ALLOCATIONS_BALANCE_SERVICE_ROOT_URL=http://allocations_api:8080 # Keycloak realm management -KEYCLOAK_SERVER_URL=https://auth.dev.chameleoncloud.org +KEYCLOAK_SERVER_URL=https://chameleon.local:8080 KEYCLOAK_REALM_NAME=chameleon # This client is in the Keycloak "master" realm KEYCLOAK_PORTAL_ADMIN_CLIENT_ID=portal-local-dev-admin -KEYCLOAK_PORTAL_ADMIN_CLIENT_SECRET= +KEYCLOAK_PORTAL_ADMIN_CLIENT_SECRET=portal-local-dev-admin-secret # these are testing values, that will not work for production traffic RECAPTCHA_PUBLIC_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI @@ -88,13 +89,13 @@ SSO_CALLBACK_VALID_HOSTS=['dev.tacc.chameleoncloud.org','dev.uc.chameleoncloud.o # Federated SSO # This client is in the Keycloak "chameleon" realm OIDC_RP_CLIENT_ID=portal-local-dev -OIDC_RP_CLIENT_SECRET= +OIDC_RP_CLIENT_SECRET=portal-local-dev-secret OIDC_RP_SIGN_ALGO=RS256 -OIDC_OP_JWKS_ENDPOINT=https://auth.dev.chameleoncloud.org/auth/realms/chameleon/protocol/openid-connect/certs -OIDC_OP_AUTHORIZATION_ENDPOINT=https://auth.dev.chameleoncloud.org/auth/realms/chameleon/protocol/openid-connect/auth -OIDC_OP_TOKEN_ENDPOINT=https://auth.dev.chameleoncloud.org/auth/realms/chameleon/protocol/openid-connect/token -OIDC_OP_USER_ENDPOINT=https://auth.dev.chameleoncloud.org/auth/realms/chameleon/protocol/openid-connect/userinfo -LOGOUT_REDIRECT_URL=https://auth.dev.chameleoncloud.org/auth/realms/chameleon/protocol/openid-connect/logout?client_id=portal-local-dev-admin&redirect_uri=https%3A%2F%2Fauth.dev.chameleoncloud.org%2Fauth%2Frealms%2Fchameleon%2Fpost-logout%3Fclient_id%3Dportal-local-dev-admin +OIDC_OP_JWKS_ENDPOINT=https://chameleon.local:8080/auth/realms/chameleon/protocol/openid-connect/certs +OIDC_OP_AUTHORIZATION_ENDPOINT=https://chameleon.local:8080/auth/realms/chameleon/protocol/openid-connect/auth +OIDC_OP_TOKEN_ENDPOINT=https://chameleon.local:8080/auth/realms/chameleon/protocol/openid-connect/token +OIDC_OP_USER_ENDPOINT=https://chameleon.local:8080/auth/realms/chameleon/protocol/openid-connect/userinfo +LOGOUT_REDIRECT_URL=https://chameleon.local:8080/auth/realms/chameleon/protocol/openid-connect/logout?client_id=portal-local-dev-admin&redirect_uri=https%3A%2F%2Fchameleon.local:8080%2Fauth%2Frealms%2Fchameleon%2Fpost-logout%3Fclient_id%3Dportal-local-dev-admin # Publication APIs SEMANTIC_SCHOLAR_API_KEY= @@ -107,4 +108,5 @@ EDGE_OS_IDENTITY_API_VERSION=3 EDGE_OS_REGION_NAME="CHI@Edge" EDGE_OS_INTERFACE=public EDGE_OS_APPLICATION_CREDENTIAL_ID= -EDGE_OS_APPLICATION_CREDENTIAL_SECRET= \ No newline at end of file +EDGE_OS_APPLICATION_CREDENTIAL_SECRET= +REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt From 9f419b71797d66f6ed23e8faad5fcefedf0f4e92 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Mon, 10 Jun 2024 16:00:49 +0000 Subject: [PATCH 3/3] Add membership count and index to users on project page --- projects/templates/projects/view_project.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/projects/templates/projects/view_project.html b/projects/templates/projects/view_project.html index 124b4679..d6866693 100644 --- a/projects/templates/projects/view_project.html +++ b/projects/templates/projects/view_project.html @@ -156,19 +156,24 @@

Project Members

{% endif %}
+ +

{{ users | length }} users{% if invitations %}, {{ invitations | length }} pending invitations{% endif %}{% if join_requests %}, {{ join_requests | length }} requests{% endif %}

+
{% for u in users %}
-
+
#{{ forloop.counter }}
+
{{ u.username }}
-
- {{ u.first_name }}, {{ u.last_name }} +
+ {{ u.username }}
-
+
+ {{ u.first_name }}, {{ u.last_name }}
{% if u.username == request.user.username or can_manage_project_membership %}