Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update actions/cache action to v4 - autoclosed #85

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4c4b072
assets: Change the logo
Aug 19, 2020
b7e1ae6
assets: CSS adjustments
Aug 19, 2020
f7a1523
diid/docs: point to diid-repo
fuzzylogic2000 Aug 17, 2020
6eefcb9
config: Enable saml2 and add some configs
rmader Aug 20, 2020
398c30d
apps/users: Add a saml2 specific helper func
rmader Aug 20, 2020
537f69d
templates: Adapt login experience slightly
rmader Aug 20, 2020
5962ced
docs: Add shibolleth docu for DIID
rmader Aug 20, 2020
bea6f70
templates/email_base: removing fixed width and updating image file fi…
Oct 22, 2020
052c201
saml2: Add test-server config
rmader Oct 22, 2020
ecd124f
apps: Add app with djangosaml2 overwrites
rmader Oct 22, 2020
81cd4ee
users/forms: add aditional checkboxes and edit existing on signup for…
Oct 19, 2020
86d0154
test/users: update tests to reflect additions to form
Nov 3, 2020
9c2b492
diid: Add a default_idp setting
rmader Nov 3, 2020
d98842f
translations: mark diid-specific translations via context "diid"
fuzzylogic2000 Nov 4, 2020
5f64663
translations: use locale-fork for translations
rmader Nov 12, 2020
4b0609f
adds/djangosaml2_overwrites: Add a middleware to guard saml signup
rmader Nov 12, 2020
496325d
ci: use github actions, remove unused travis
goapunk Nov 25, 2021
f48ab36
tests/user factory: add email address to DB after user was created
fuzzylogic2000 Jan 10, 2022
5ea56f4
tests/signup: disable signup tests that are redirected by django saml…
fuzzylogic2000 Jan 10, 2022
ff06d40
translations: makemessages
fuzzylogic2000 Jan 25, 2022
d31369d
wording: change teilhabe.diid... to dialog.diid...
fuzzylogic2000 Jan 25, 2022
748b70c
translations: makemessages
fuzzylogic2000 Jan 25, 2022
bcf67c9
translations: add new translation
fuzzylogic2000 Jan 25, 2022
9842775
deps and pyup: use own requirements file for fork-specific packages
fuzzylogic2000 Jan 26, 2022
36f7abf
deps/py: update djangosaml2 to 1.3.5
fuzzylogic2000 Jan 26, 2022
c673eef
Update djangosaml2 from 1.3.5 to 1.3.6
pyup-bot Mar 7, 2022
0c67a4e
Update djangosaml2 from 1.3.6 to 1.5.0
pyup-bot Apr 25, 2022
7ec29f9
fix newsletter tests
goapunk Apr 28, 2022
189ae2b
tests: fix and reenable the user tests
goapunk Apr 28, 2022
156c7d7
renovate: only update fork packages
goapunk Aug 3, 2022
fc8d7ef
renovate: disable for npm
goapunk Aug 4, 2022
a5c526e
chore(deps): update dependency djangosaml2 to v1.5.1
renovate[bot] Aug 4, 2022
a736eeb
assest/images: update logo so correct size fixes #66
philli-m Feb 23, 2023
ac47a18
assets/*: colour fixes from lib removal fixes #68 fixes #69
philli-m Feb 23, 2023
6a46bb2
assets/images: add transparent logo for sharepic after rebase removed it
philli-m Feb 24, 2023
b864a56
chore(deps): update dependency djangosaml2 to v1.5.8
renovate[bot] May 31, 2023
0eca426
apps/users: only allow university login
m4ra Oct 12, 2023
70446e9
Makefile: add documenattion for local saml set up scripts
philli-m Oct 11, 2023
808771d
apps/djangosamle2_overwrites: extend form_field to include additional…
philli-m Oct 11, 2023
9ffd453
update translations
goapunk Oct 16, 2023
30f0f07
add some missing translations
goapunk Oct 16, 2023
00d505c
release v2306.2
goapunk Oct 16, 2023
0b8958f
chore(deps): update dependency djangosaml2 to v1.8.0
renovate[bot] Dec 20, 2023
50e2f36
chore(deps): update actions/checkout action to v4
renovate[bot] Dec 21, 2023
b3e0c53
chore(deps): update actions/setup-node action to v4
renovate[bot] Dec 21, 2023
c3f642a
chore(deps): update actions/setup-python action to v5
renovate[bot] Dec 21, 2023
0295e58
release v2312.1
goapunk Dec 27, 2023
d2a3375
chore(deps): update actions/cache action to v4
renovate[bot] Jan 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Setup Postgres
Expand All @@ -39,7 +39,7 @@ jobs:
psql -c 'create database django;' -U postgres
psql -c 'create database django_test;' -U postgres
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -50,7 +50,7 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache pip packages
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-pip-packages
with:
Expand Down
654 changes: 8 additions & 646 deletions CHANGELOG.md

Large diffs are not rendered by default.

25 changes: 23 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ VIRTUAL_ENV ?= venv
NODE_BIN = node_modules/.bin
SOURCE_DIRS = adhocracy-plus apps tests
ARGUMENTS=$(filter-out $(firstword $(MAKECMDGOALS)), $(MAKECMDGOALS))
PORT = 8004

SED = sed
ifneq (, $(shell command -v gsed;))
Expand Down Expand Up @@ -48,6 +49,8 @@ help:
@echo " make celery-worker-start -- starts the celery worker in the foreground"
@echo " make celery-worker-status -- lists all registered tasks and active worker nodes"
@echo " make celery-worker-dummy-task -- calls the dummy task and prints result from redis"
@echo " make saml-install -- script to install local version of single sign-in in docker container"
@echo " make saml-server -- script to run local version of single sign-in in docker container"
@echo

.PHONY: install
Expand All @@ -72,13 +75,13 @@ fixtures:

.PHONY: server
server:
$(VIRTUAL_ENV)/bin/python manage.py runserver 8004
$(VIRTUAL_ENV)/bin/python manage.py runserver $(PORT)

.PHONY: watch
watch:
trap 'kill %1' KILL; \
npm run watch & \
$(VIRTUAL_ENV)/bin/python manage.py runserver 8004
$(VIRTUAL_ENV)/bin/python manage.py runserver $(PORT)

.PHONY: background
background:
Expand Down Expand Up @@ -216,3 +219,21 @@ celery-worker-status:
.PHONY: celery-worker-dummy-task
celery-worker-dummy-task:
$(VIRTUAL_ENV)/bin/celery --app adhocracy-plus call dummy_task | awk '{print "celery-task-meta-"$$0}' | xargs redis-cli get | python3 -m json.tool

.PHONY: saml-install
CERTS_DIR := ${CURDIR}/adhocracy-plus/config/settings/saml
saml-install:
docker pull kristophjunge/test-saml-idp
openssl req -nodes -new -x509 -keyout ${CERTS_DIR}/private.key -out ${CERTS_DIR}/cert.pem -subj \
"/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=example.com"

.PHONY: saml-server
saml-server:
cp ${PWD}/scripts/saml2_authsources.php /tmp/saml2_authsources.php
chmod 755 /tmp/saml2_authsources.php
test ! -z "${LIQD_NO_SSO_LOGIN}" || docker run -p 8080:8080 -p 8443:8443 \
-e SIMPLESAMLPHP_SP_ENTITY_ID=http://app.example.com \
-e SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost:$(PORT)/saml2/acs/ \
-e SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE=http://localhost:$(PORT)/saml2/ls/ \
-v /tmp/saml2_authsources.php:/var/www/simplesamlphp/config/authsources.php \
kristophjunge/test-saml-idp
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[adhocracy.plus](https://adhocracy.plus/) is a free Open-Source participation platform maintained and primarily developed by Liquid Democracy e.V.. It is based on [adhocracy 4](https://github.com/liqd/adhocracy4) and [Django](https://github.com/django/django).

![Build Status](https://github.com/liqd/adhocracy-plus/actions/workflows/django.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/liqd/adhocracy-plus/badge.svg?branch=main)](https://coveralls.io/github/liqd/adhocracy-plus?branch=main)
![Build Status](https://github.com/liqd/diid-adplus/actions/workflows/django.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/liqd/diid-adplus/badge.svg?branch=main)](https://coveralls.io/github/liqd/diid-adplus?branch=main)

## Getting started

Expand All @@ -20,8 +20,8 @@ adhocracy+ is designed to make online participation easy and accessible to every

### Installation

git clone https://github.com/liqd/adhocracy-plus.git
cd adhocracy-plus
git clone https://gitlab.cs.uni-duesseldorf.de/diid/diid_adplus.git
cd diid_adplus
make install
make fixtures

Expand Down
Binary file modified adhocracy-plus/assets/images/email_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified adhocracy-plus/assets/images/favicon/favicon-16x16.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified adhocracy-plus/assets/images/favicon/favicon-32x32.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified adhocracy-plus/assets/images/favicon/favicon-96x96.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified adhocracy-plus/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 0 additions & 16 deletions adhocracy-plus/assets/images/logo.svg

This file was deleted.

Binary file added adhocracy-plus/assets/images/logo_sharepic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion adhocracy-plus/assets/scss/_utility.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.u-hhu {
color: $brand-primary;
font-weight: bold;
}

.u-overlap-top {
margin-top: (-1.5 * $padding);
}
Expand Down Expand Up @@ -108,7 +113,7 @@
}

.u-page-ribbon {
background: linear-gradient(to right, $brand-primary, $brand-primary 33%, $brand-secondary 66%, $brand-secondary);
background: $brand-primary;
height: 0.5em;
}

Expand Down
20 changes: 11 additions & 9 deletions adhocracy-plus/assets/scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// subset of bootstrap variables
$brand-primary: #2d40cc; // ultramarine
$brand-primary: #006ab3 !default; // dark blue

$brand-secondary: #90efe4 !default; // terquoise
$brand-secondary: #d9e9f4 !default; // greeny blue
$brand-secondary-dark: #57bab1 !default; // same as above

$brand-tertiary: #008dc5 !default; // prussian blue
$brand-tertiary: #73add5 !default; // lighter blue

/* Don't use variables but hex-values here as they should not be overwritten on organisation pages */
$brand-success: #a3ef90 !default;
$brand-success: #d7e4ac !default;
$brand-info: $brand-primary !default; // $brand-primary from platform.scss
$brand-warning: #ffc107 !default;
$brand-danger: #a72b1e !default;
$brand-warning: #f9d2a6 !default;
$brand-danger: #e9aab3 !default;

$primary: $brand-primary !default;
$secondary: $brand-secondary !default;
Expand Down Expand Up @@ -42,10 +43,11 @@ $print-link: #005cb4 !default;

$brand-primary-tint: lighten($brand-primary, 47%) !default;
$brand-secondary-tint: lighten($brand-secondary, 20%) !default;
$brand-tertiary-tint: lighten($brand-tertiary, 55%) !default;
$brand-tertiary-tint: lighten($brand-tertiary, 30%) !default;

$bg-light: #f7f7f7;
$bg-tertiary: $brand-tertiary-tint !default;
$bg-tertiary: #d9e9f4 !default;
$bg-secondary: #c1d9e1 !default;
$bg-light: #fbfbfb;

$demi-bold: 600;
$headings-font-weight: $demi-bold !default;
Expand Down
8 changes: 4 additions & 4 deletions adhocracy-plus/assets/scss/components/_alerts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ $messages-margin-bottom: 25px;
.alert {
margin: 0;
padding: (1.2 * $padding) $padding;
background-color: $brand-primary-tint;
background-color: lighten($brand-info, 30%);
color: $text-color;
text-align: center;
border-radius: 0;
flex: 1 1 auto;
}

.alert--success {
background-color: lighten($brand-success, 15);
background-color: $brand-success;
color: $text-color;
}

.alert--error,
.alert--danger {
background-color: lighten($brand-danger, 50);
background-color: $brand-danger;
color: $text-color;
}

.alert--warning {
background-color: lighten($brand-warning, 30);
background-color: $brand-warning;
color: $text-color;
}

Expand Down
4 changes: 2 additions & 2 deletions adhocracy-plus/assets/scss/components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
}

.btn.btn--light {
@include button($brand-tertiary, $text-color, $text-color, 57%);
@include button($brand-tertiary, $text-color, $text-color, 30%);
}

.btn.btn--primary {
Expand All @@ -77,7 +77,7 @@
}

.btn.btn--secondary-filled {
@include button-bg($brand-secondary, $brand-secondary, $print-black, 10%);
@include button-bg($brand-secondary, $brand-secondary, $print-black, 3%);
}

.btn.btn--bg-tertiary {
Expand Down
2 changes: 1 addition & 1 deletion adhocracy-plus/assets/scss/components/_header_upper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@

@media screen and (min-width: $breakpoint) {
.header-upper__brand-img {
height: 2.5rem;
height: 3.5rem;
}
}
2 changes: 1 addition & 1 deletion adhocracy-plus/assets/scss/components/_list_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,6 @@

.list-item__cta {
text-transform: uppercase;
color: $brand-info;
color: $brand-primary;
box-shadow: none;
}
4 changes: 2 additions & 2 deletions adhocracy-plus/assets/scss/components/_poll.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $checkbox-size: 20px;
}

.poll-row__bar {
background-color: $brand-primary-tint;
background-color: $brand-tertiary-tint;
position: absolute;
top: 0;
bottom: 0;
Expand All @@ -102,7 +102,7 @@ $checkbox-size: 20px;
}

.poll__highlight {
background-color: $brand-tertiary-tint;
background-color: $brand-primary-tint;
}

.poll__btn--wrapper {
Expand Down
11 changes: 9 additions & 2 deletions adhocracy-plus/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"django.contrib.messages",
"django.contrib.staticfiles",
"django.contrib.humanize",
"apps.djangosaml2_overwrites",
"djangosaml2",
"widget_tweaks",
"rest_framework",
"rest_framework.authtoken",
Expand Down Expand Up @@ -123,18 +125,20 @@
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
"djangosaml2.middleware.SamlSessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"wagtail.contrib.redirects.middleware.RedirectMiddleware",
"apps.djangosaml2_overwrites.middlewares.SamlSignupMiddleware",
)

ROOT_URLCONF = "adhocracy-plus.config.urls"

LOCALE_PATHS = [
# use the first line in branches and forks to keep the original translations
# from main branch and overwrite or add extra translations in fork
# os.path.join(BASE_DIR, 'locale-fork/locale'),
os.path.join(BASE_DIR, "locale-source/locale")
os.path.join(BASE_DIR, "locale-fork/locale"),
os.path.join(BASE_DIR, "locale-source/locale"),
]

TEMPLATES = [
Expand Down Expand Up @@ -270,6 +274,7 @@
"rules.permissions.ObjectPermissionBackend",
"django.contrib.auth.backends.ModelBackend",
"allauth.account.auth_backends.AuthenticationBackend",
"djangosaml2.backends.Saml2Backend",
)

ACCOUNT_ADAPTER = "apps.users.adapters.AccountAdapter"
Expand Down Expand Up @@ -561,3 +566,5 @@
CELERY_RESULT_BACKEND = "redis://localhost:6379"
CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP = True
CELERY_RESULT_EXTENDED = True

USER_REGISTRATION = False
46 changes: 46 additions & 0 deletions adhocracy-plus/config/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,51 @@

CELERY_TASK_ALWAYS_EAGER = True

# DIID specific test saml2 config
from os import path

import saml2
import saml2.saml

BASEDIR = path.dirname(path.abspath(__file__))

SAML_CONFIG = {
'entityid': 'http://app.example.com',
'allow_unknown_attributes': True,
'attribute_map_dir': path.join(BASEDIR, 'saml', 'attribute-maps'),
'service': {
'sp': {
'name': 'Federated Django sample SP',
'name_id_format': saml2.saml.NAMEID_FORMAT_PERSISTENT,
'endpoints': {
'single_logout_service': [
('http://localhost:8004/saml2/ls/', saml2.BINDING_HTTP_REDIRECT),
('http://localhost:8004/saml2/ls/post', saml2.BINDING_HTTP_POST),
],
'assertion_consumer_service': [
('http://localhost:8004/saml2/acs/', saml2.BINDING_HTTP_POST),
],
},
'required_attributes': ['mail'],
},
},
'metadata': {
'remote': [{"url": "http://localhost:8080/simplesaml/saml2/idp/metadata.php"},],
},
'key_file': path.join(BASEDIR, 'saml', 'private.key'),
'cert_file': path.join(BASEDIR, 'saml', 'cert.pem'),
'encryption_keypairs': [{
'key_file': path.join(BASEDIR, 'saml', 'private.key'),
'cert_file': path.join(BASEDIR, 'saml', 'cert.pem'),
}],
'debug': 1,
}
SAML_DJANGO_USER_MAIN_ATTRIBUTE = 'email'
SAML_LOGOUT_REQUEST_PREFERRED_BINDING = saml2.BINDING_HTTP_REDIRECT
SAML_ATTRIBUTE_MAPPING = {
'mail': ['email', 'set_username_from_email'],
}

# The local.py import happens at the end of this file so that it can overwrite
# any defaults in dev.py.
# Special cases are:
Expand All @@ -59,3 +104,4 @@
CKEDITOR_CONFIGS["video-editor"]["embed_provider"] = CKEDITOR_URL
except NameError:
pass

Loading