Skip to content
Commits on Source (28)
......@@ -6,6 +6,19 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_.
`2.2.1_ – 2021-12-02
--------------------
Fixed
~~~~~
* [Docker] Stop initialisation if migrations fail
* [OAuth] Register `groups` scope and fix claim
* [OAuth] Fix OAuth claims for follow-up requests (e.g. UserInfo)
* [OAuth] Fix grant types checking failing on wrong types under some circumstances
* [OAuth] Re-introduce missing algorithm field in application form
* Remove errornous backup folder check for S3
`2.2`_ - 2021-11-29
-------------------
......@@ -487,3 +500,4 @@ Fixed
.. _2.1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.1
.. _2.1.1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.1.1
.. _2.2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.2
.. _2.2.1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.2.1
......@@ -76,6 +76,14 @@ full licence text or on the `European Union Public Licence`_ website
https://joinup.ec.europa.eu/collection/eupl/guidelines-users-and-developers
(including all other official language versions).
Trademark
---------
AlekSIS® is a registered trademark of the AlekSIS open source project, represented
by Teckids e.V. Please refer to the `trademark policy`_ for hints on using the trademark
AlekSIS®.
.. _AlekSIS: https://aleksis.org
.. _European Union Public Licence: https://eupl.eu/
.. _EduGit: https://edugit.org/AlekSIS/official/AlekSIS
.. _trademark policy: https://aleksis.org/pages/about
......@@ -153,5 +153,6 @@ class CoreConfig(AppConfig):
"address": _("Full home postal address"),
"email": _("Email address"),
"phone": _("Home and mobile phone"),
"groups": _("Groups"),
}
return scopes
......@@ -746,6 +746,7 @@ class OAuthApplicationForm(forms.ModelForm):
"client_id",
"client_secret",
"client_type",
"algorithm",
"allowed_scopes",
"redirect_uris",
"skip_authorization",
......
......@@ -34,9 +34,6 @@ class BaseBackupHealthCheck(BaseHealthCheckBackend):
def check_status(self):
storage = get_storage()
backups = storage.list_backups(content_type=self.content_type)
if not storage.storage.exists(""):
self.add_error(_("The backup folder doesn't exist."))
return
if backups:
last_backup = backups[:1]
last_backup_time = dbbackup_utils.filename_to_date(last_backup[0])
......
......@@ -1132,7 +1132,7 @@ class OAuthApplication(AbstractApplication):
def allows_grant_type(self, *grant_types: set[str]) -> bool:
allowed_grants = get_site_preferences()["auth__oauth_allowed_grants"]
return bool(set(allowed_grants) & grant_types)
return bool(set(allowed_grants) & set(grant_types))
class OAuthGrant(AbstractGrant):
......
......@@ -172,7 +172,7 @@
<div class="container">
<div class="left">
<a class="blue-text text-lighten-4" href="{% url "about_aleksis" %}">
{% trans "About AlekSIS — The Free School Information System" %}
{% trans "About AlekSIS® — The Free School Information System" %}
</a>
© The AlekSIS Team
</div>
......
......@@ -69,7 +69,7 @@
</div>
<div class="right">
{% trans "Powered by AlekSIS" %}
{% trans "Powered by AlekSIS®" %}
</div>
</footer>
</div>
......
......@@ -3,8 +3,8 @@
{% load i18n %}
{% block browser_title %}{% blocktrans %}About AlekSIS{% endblocktrans %}{% endblock %}
{% block page_title %}{% blocktrans %}AlekSIS – The Free School Information System{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}About AlekSIS®{% endblocktrans %}{% endblock %}
{% block page_title %}{% blocktrans %}AlekSIS® – The Free School Information System{% endblocktrans %}{% endblock %}
{% block content %}
......@@ -15,11 +15,16 @@
<span class="card-title">{% blocktrans %}About AlekSIS{% endblocktrans %}</span>
<p>
{% blocktrans %}
This platform is powered by AlekSIS, a web-based school information system (SIS) which can be used
This platform is powered by AlekSIS®, a web-based school information system (SIS) which can be used
to manage and/or publish organisational artifacts of educational institutions. AlekSIS is free software and
can be used by anyone.
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
AlekSIS® is a registered trademark of the AlekSIS open source project, represented by Teckids e.V.
{% endblocktrans %}
</p>
</div>
<div class="card-action">
<a class="" href="https://aleksis.org/">{% trans "Website of AlekSIS" %}</a>
......
......@@ -47,11 +47,15 @@ class CustomOAuth2Validator(OAuth2Validator):
django_request = HttpRequest()
django_request.META = request.headers
scopes = request.scopes.copy()
if request.access_token:
scopes += request.access_token.scope.split(" ")
claims = {
"preferred_username": request.user.username,
}
if "profile" in request.scopes:
if "profile" in scopes:
if has_person(request.user):
claims["given_name"] = request.user.person.first_name
claims["family_name"] = request.user.person.last_name
......@@ -66,13 +70,13 @@ class CustomOAuth2Validator(OAuth2Validator):
claims["given_name"] = request.user.first_name
claims["family_name"] = request.user.last_name
if "email" in request.scopes:
if "email" in scopes:
if has_person(request.user):
claims["email"] = request.user.person.email
else:
claims["email"] = request.user.email
if "address" in request.scopes and has_person(request.user):
if "address" in scopes and has_person(request.user):
claims["address"] = {
"street_address": request.user.person.street
+ " "
......@@ -81,8 +85,10 @@ class CustomOAuth2Validator(OAuth2Validator):
"postal_code": request.user.person.postal_code,
}
if "groups" in request.scopes and has_person(request.user):
claims["groups"] = request.user.person.groups.values_list("name", flat=True).all()
if "groups" in scopes and has_person(request.user):
claims["groups"] = list(
request.user.person.member_of.values_list("name", flat=True).all()
)
return claims
......
......@@ -48,8 +48,7 @@ wait_database() {
prepare_database() {
# Migrate database; should only be run in app container or job
aleksis-admin migrate
aleksis-admin createinitialrevisions
aleksis-admin migrate && aleksis-admin createinitialrevisions
}
# Wait for database to be reachable under all conditions
......
This diff is collapsed.
[tool.poetry]
name = "AlekSIS-Core"
version = "2.2"
version = "2.2.1"
packages = [
{ include = "aleksis" }
]
......@@ -74,7 +74,7 @@ html2text = "^2020.0.0"
django-ckeditor = "^6.0.0"
django-js-reverse = "^0.9.1"
calendarweek = "^0.5.0"
Celery = {version="^5.0.0", extras=["django", "redis"]}
Celery = {version=">=5.0,<5.2", extras=["django", "redis"]}
django-celery-results = "^2.0.1"
django-celery-beat = "^2.2.0"
django-celery-email = "^3.0.0"
......