Skip to content

Commit

Permalink
Merge cc4792b into 1f28da0
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzWeber0 authored Oct 1, 2024
2 parents 1f28da0 + cc4792b commit 57ff9e8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
14 changes: 7 additions & 7 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ RUN apt-get update && \
apt-get upgrade --yes && \
apt-get install --yes \
ca-certificates \
unzip \
libpq-dev \
curl \
git-lfs \
gnupg \
libpq-dev \
python3 \
python3-pip \
python3-venv \
gnupg \
git-lfs \
unzip \
&& rm -rf /var/lib/apt/lists/*

ARG KUBECTL_APT_REMOTE=https://pkgs.k8s.io/core:/stable:/v1.29/deb/
Expand All @@ -38,15 +38,15 @@ COPY .git_archival.txt /tmp/.git_archival.txt
COPY startup.sh /opt/.startup.sh

# Activate venv
RUN ln -s $(which python3.11) /usr/bin/python && \
ln -sf $(which python3.11) /usr/bin/python3 && \
RUN ln -s "$(which python3.11)" /usr/bin/python && \
ln -sf "$(which python3.11)" /usr/bin/python3 && \
python -m venv /opt/.venv
ENV _OLD_VIRTUAL_PATH="$PATH"
ENV VIRTUAL_ENV=/opt/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

WORKDIR /tmp/backend
RUN pip install . && chmod +x $VIRTUAL_ENV/lib/python3.11/site-packages/capellacollab/settings/modelsources/git/askpass.py
RUN pip install . && chmod +x "$VIRTUAL_ENV/lib/python3.11/site-packages/capellacollab/settings/modelsources/git/askpass.py"

RUN mkdir -p /var/log/backend && \
chmod -R 777 /var/log/backend
Expand Down
5 changes: 1 addition & 4 deletions backend/capellacollab/sessions/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,7 @@ def get_sessions_for_user(
),
db: orm.Session = fastapi.Depends(database.get_db),
):
if (
user != current_user
and not current_user.role != users_models.Role.ADMIN
):
if user != current_user and current_user.role != users_models.Role.ADMIN:
raise exceptions.SessionForbiddenError()

return user.sessions + list(
Expand Down
5 changes: 0 additions & 5 deletions backend/tests/sessions/test_session_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
from capellacollab.users import models as users_models


@pytest.fixture(name="mock_session_methods")
def fixture_mock_session_methods():
pass


class MockOperator:
environment = {}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/events/service/events.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class EventsService {
case 'projectName':
return data.project ? data.project.name : '';
case 'reason':
return data.reason || '';
return data.reason ?? '';
default:
return '';
}
Expand Down
6 changes: 5 additions & 1 deletion images/session-preparation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ FROM ${ALPINE_BASE_IMAGE}
USER root

COPY clone_repositories.py /opt/clone_repositories.py
RUN apk add --no-cache git git-lfs python3 py3-pip
RUN apk add --no-cache \
git \
git-lfs \
py3-pip \
python3

COPY git_askpass.py /etc/git_askpass.py
RUN chmod 555 /etc/git_askpass.py
Expand Down

0 comments on commit 57ff9e8

Please sign in to comment.