Skip to content
Commits on Source (44)
......@@ -6,10 +6,25 @@ 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`_.
Unreleased
----------
`3.1.1` - 2023-07-01
--------------------
Changes
Fixed
~~~~~
* Progress page didn't work properly.
* About page failed to load for apps with an unknown licence.
* QUeries for persons with partial permissions failed.
* Some pages couldn't be scrolled when a task progress popup was open.
* Notification query failed on admin users without persons.
* Querying for notification caused unnecessary database requests.
* Loading bar didn't disappear on some pages after loading was finished.
* Support newer versions of django-oauth-toolkit.
`3.1`_ - 2023-05-30
-------------------
Changed
~~~~~~~
* The frontend is now able to display headings in the main toolbar.
......@@ -17,16 +32,16 @@ Changes
Fixed
~~~~~
* Default translations from vuetify were not loaded.
* Default translations from Vuetify were not loaded.
* Browser locale was not the default locale in the entire frontend.
* In some cases, some items in the sidenav menu were not shown due to its height being higher than the visible page area.
* The search bar in the sidenav menu is shown even though the user has no permission to see it.
* Add permission check to accept invitation menu point in order to hide it when this feature is disabled.
* In some cases, items in the sidenav menu were not shown.
* The search bar in the sidenav menu was shown even though the user had no permission to see it.
* Accept invitation menu item was shown when the invitation feature was disabled.
* Metrics endpoint for Prometheus was at the wrong URL.
* Polling behavior of the whoAmI and permission queries was fixed.
* Polling behavior of the whoAmI and permission queries was improved.
* Confirmation e-mail contained a wrong link.
`3.0`_ - 2022-05-11
`3.0`_ - 2023-05-11
-------------------
Added
......@@ -69,7 +84,7 @@ Fixed
* Backend cleanup task for Celery wasn't working.
* URLs in invitation email were broken.
* Invitation view didn't work.
* Invitation emails were using wrong styling.
* Invitation emails were using wrong styling.
* GraphQL queries and mutations did not log exceptions.
`3.0b3`_ - 2023-03-19
......@@ -1115,50 +1130,52 @@ Fixed
.. _Keep a Changelog: https://keepachangelog.com/en/1.0.0/
.. _Semantic Versioning: https://semver.org/spec/v2.0.0.html
.. _1.0a1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/1.0a1
.. _1.0a2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/1.0a2
.. _1.0a4: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/1.0a4
.. _2.0a1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0a1
.. _2.0a2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0a2
.. _2.0b0: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0b0
.. _2.0b1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0b1
.. _2.0b2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0b2
.. _2.0rc1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0rc1
.. _2.0rc2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0rc2
.. _2.0rc3: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0rc3
.. _2.0rc4: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0rc4
.. _2.0rc5: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0rc5
.. _2.0rc6: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0rc6
.. _2.0rc7: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0rc7
.. _2.0: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.0
.. _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
.. _2.3: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.3
.. _2.3.1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.3.1
.. _2.4: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.4
.. _2.5: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.5
.. _2.6: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.6
.. _2.7: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.7
.. _2.7.1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.7.1
.. _2.7.2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.7.2
.. _2.7.3: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.7.3
.. _2.7.4: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.7.4
.. _2.8: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.8
.. _2.8.1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.8.1
.. _2.9: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.9
.. _2.10: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.10
.. _2.10.1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.10.1
.. _2.10.2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.10.2
.. _2.11: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.11
.. _2.11.1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.11.1
.. _2.12: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.12
.. _2.12.1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.12.1
.. _2.12.2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.12.2
.. _2.12.3: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/2.12.3
.. _3.0b0: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/3.0b0
.. _3.0b1: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/3.0b1
.. _3.0b2: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/3.0b2
.. _3.0b3: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/3.0b3
.. _3.0: https://edugit.org/AlekSIS/Official/AlekSIS/-/tags/3.0
.. _1.0a1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/1.0a1
.. _1.0a2: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/1.0a2
.. _1.0a4: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/1.0a4
.. _2.0a1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0a1
.. _2.0a2: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0a2
.. _2.0b0: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0b0
.. _2.0b1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0b1
.. _2.0b2: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0b2
.. _2.0rc1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0rc1
.. _2.0rc2: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0rc2
.. _2.0rc3: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0rc3
.. _2.0rc4: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0rc4
.. _2.0rc5: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0rc5
.. _2.0rc6: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0rc6
.. _2.0rc7: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0rc7
.. _2.0: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.0
.. _2.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.1
.. _2.1.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.1.1
.. _2.2: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.2
.. _2.2.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.2.1
.. _2.3: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.3
.. _2.3.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.3.1
.. _2.4: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.4
.. _2.5: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.5
.. _2.6: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.6
.. _2.7: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.7
.. _2.7.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.7.1
.. _2.7.2: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.7.2
.. _2.7.3: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.7.3
.. _2.7.4: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.7.4
.. _2.8: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.8
.. _2.8.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.8.1
.. _2.9: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.9
.. _2.10: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.10
.. _2.10.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.10.1
.. _2.10.2: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.10.2
.. _2.11: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.11
.. _2.11.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.11.1
.. _2.12: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.12
.. _2.12.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.12.1
.. _2.12.2: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.12.2
.. _2.12.3: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/2.12.3
.. _3.0b0: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/3.0b0
.. _3.0b1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/3.0b1
.. _3.0b2: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/3.0b2
.. _3.0b3: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/3.0b3
.. _3.0: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/3.0
.. _3.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/3.1
.. _3.1.1: https://edugit.org/AlekSIS/official/AlekSIS-Core/-/tags/3.1.1
......@@ -71,7 +71,9 @@ export default {
// Show loader if iframe starts to change its content, even if the $route stays the same
this.$refs.contentIFrame.contentWindow.onpagehide = () => {
this.$root.contentLoading = true;
if (this.$root.isLegacyBaseTemplate) {
this.$root.contentLoading = true;
}
};
// Write title of iframe to SPA window
......
<template>
<v-bottom-sheet :value="show" persistent hide-overlay max-width="400px">
<v-bottom-sheet
:value="show"
persistent
hide-overlay
max-width="400px"
ref="sheet"
>
<v-expansion-panels accordion v-model="open">
<v-expansion-panel>
<v-expansion-panel-header color="primary" class="white--text px-4">
......@@ -33,6 +39,13 @@ export default {
data() {
return { open: 0 };
},
mounted() {
// Vuetify uses the hideScroll method to disable scrolling by setting an event listener
// to the window. As event listeners can only be removed by referencing the listener
// method and because vuetify this method is called on every state change of the dialog,
// we simply replace the method in this component instance
this.$refs.sheet.hideScroll = this.$refs.sheet.showScroll;
},
computed: {
show() {
return this.celeryProgressByUser && this.celeryProgressByUser.length > 0;
......
......@@ -20,7 +20,7 @@
v-if="
myNotifications &&
myNotifications.person &&
myNotifications.person.unreadNotificationsCount > 0
myNotifications.person.notifications.length > 0
"
>
mdi-bell-badge-outline
......@@ -38,7 +38,7 @@
v-if="
myNotifications.person &&
myNotifications.person.notifications &&
myNotifications.person.notifications.length
unreadNotifications.length
"
>
<v-subheader>{{ $t("notifications.notifications") }}</v-subheader>
......@@ -86,5 +86,10 @@ export default {
pollInterval: 30000,
},
},
computed: {
unreadNotifications() {
return this.myNotifications.filter((n) => !n.read);
},
},
};
</script>
{
myNotifications: whoAmI {
person {
unreadNotificationsCount
notifications {
id
title
......
......@@ -45,7 +45,24 @@
"menu_title": "Учётные записи третьих сторон"
},
"two_factor": {
"menu_title": "2FA"
"add_authentication_method": "Добавить метод аутентификации",
"backup_codes_count": "У Вас не осталось резервных кодов.|У Вас остался один резервный код.|У Вас осталось {counter} резервных кодов.",
"backup_codes_description": "Если Вы не сможете воспользоваться ни одним из своих устройств, Вы сможете получить доступ к учётке, используя резервные коды.",
"backup_codes_title": "Резервные коды",
"disable_button": "Отключить двухфакторную аутентификацию",
"disable_description": "Несмотря на то, что мы крайне предостерегаем Вас, Вы всё же можете отключить двухфакторную аутентификацию для своей учётки.",
"disable_title": "Отключить двухфакторную аутентификацию",
"enable_button": "Включить двухфакторную аутентификацию",
"enable_description": "Двухфакторная аутентификация в Вашей учётке не включена. Для лучшей безопасности, рекомендуем её включить.",
"enable_title": "Двухфакторная аутентификация сейчас отключена",
"menu_title": "2FA",
"methods": {
"call": "Мы позвоним на Ваш мобильный и продиктуем одноразовый код.",
"email": "Мы отправим Вам одноразовые коды на эл.почту.",
"generator": "Вы генерируете одноразовые коды с помощью генератора кодов.",
"sms": "Мы отправим Вам одноразовые коды на Ваш мобильный.",
"webauthn": "Вы используете ключ безопасности (как внешнее устройство или встроенное в Ваше переносное устройство)."
}
}
},
"actions": {
......
......@@ -73,9 +73,14 @@
},
"actions": {
"back": "Назад",
"cancel": "Скасувати",
"close": "Закрити",
"confirm_deletion": "Ви дійсно хочете видалити цей об'єкт?",
"delete": "Видалити",
"edit": "Редагувати",
"search": "Пошук"
"save": "Зберегти",
"search": "Пошук",
"stop_editing": "Завершити редагування"
},
"administration": {
"backend_admin": {
......@@ -173,6 +178,17 @@
"title": "Додаток OAuth2",
"title_plural": "Додатки OAuth2"
},
"authorized_application": {
"access_since": "Доступ з {date}",
"description": "Згадані сторонні додатки мають доступ до Вашого облікового запису. Доступ, який більше не потрібен або якому більше не довіряєте, можете відкликати будь-коли.",
"has_access_to": "Має доступ до:",
"menu_title": "Сторонні додатки",
"revoke": "Відкликати доступ",
"revoke_question": "Ви дійсно хочете відкликати доступ для цього додатку?",
"subtitle": "Сторонні додатки з доступом до Вашого облікового запису",
"title": "Сторонні додатки",
"valid_until": "Дійсне до {date}"
},
"authorized_token": {
"menu_title": "Авторизовані додатки"
}
......@@ -225,5 +241,11 @@
"dismiss": "Відмовитися",
"new_version_available": "Доступна нова версія програми",
"update": "Оновити"
},
"status": {
"changes": "У Вас є незбережені зміни.",
"error": "Під час збереження останньої зміни виникла помилка.",
"saved": "Усі зміни збережені.",
"updating": "Зміни синхронізуються."
}
}
# Generated by Django 4.1.9 on 2023-06-17 10:59
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("sites", "0002_alter_domain_unique"),
("core", "0048_delete_personalicalurl"),
]
operations = [
migrations.AddField(
model_name="oauthapplication",
name="post_logout_redirect_uris",
field=models.TextField(
blank=True, help_text="Allowed Post Logout URIs list, space separated"
),
),
]
......@@ -88,7 +88,7 @@ class CeleryProgressFetchedMutation(graphene.Mutation):
celery_progress = graphene.Field(CeleryProgressType)
def mutate(root, info, task_id, **kwargs):
task = TaskUserAssignment.objects.filter(task_result__task_id=task_id)
task = TaskUserAssignment.objects.get(task_result__task_id=task_id)
if not info.context.user.has_perm("core.view_progress_rule", task):
return None
......
......@@ -55,14 +55,26 @@ class PersonType(DjangoObjectType):
full_name = graphene.String()
username = graphene.String()
userid = graphene.ID()
photo = graphene.Field(FieldFileType)
avatar = graphene.Field(FieldFileType)
photo = graphene.Field(FieldFileType, required=False)
avatar = graphene.Field(FieldFileType, required=False)
avatar_url = graphene.String()
avatar_content_url = graphene.String()
secondary_image_url = graphene.String()
secondary_image_url = graphene.String(required=False)
street = graphene.String(required=False)
housenumber = graphene.String(required=False)
postal_code = graphene.String(required=False)
place = graphene.String(required=False)
phone_number = graphene.String(required=False)
mobile_number = graphene.String(required=False)
email = graphene.String(required=False)
date_of_birth = graphene.String(required=False)
place_of_birth = graphene.String(required=False)
notifications = graphene.List(NotificationType)
unread_notifications_count = graphene.Int()
unread_notifications_count = graphene.Int(required=False)
is_dummy = graphene.Boolean()
preferences = graphene.Field(PersonPreferencesType)
......@@ -150,7 +162,11 @@ class PersonType(DjangoObjectType):
return root.user.id if root.user else None
def resolve_unread_notifications_count(root, info, **kwargs): # noqa
return root.unread_notifications_count
if root.pk and has_person(info.context) and root == info.context.user.person:
return root.unread_notifications_count
elif root.pk:
return 0
return None
def resolve_photo(root, info, **kwargs):
if info.context.user.has_perm("core.view_photo_rule", root):
......@@ -199,11 +215,11 @@ class PersonType(DjangoObjectType):
return root.is_dummy if hasattr(root, "is_dummy") else False
def resolve_notifications(root: Person, info, **kwargs):
if has_person(info.context.user) and info.context.user.person == root:
if root.pk and has_person(info.context) and root == info.context.user.person:
return root.notifications.filter(send_at__lte=timezone.now()).order_by(
"read", "-created"
)
raise PermissionDenied()
return []
def resolve_can_edit_person(root, info, **kwargs): # noqa
return info.context.user.has_perm("core.edit_person_rule", root)
......
......@@ -87,6 +87,10 @@ class AppConfig(django.apps.AppConfig):
# Get string representation of licence in SPDX format
licence = getattr(cls, "licence", None)
default_flags = {
"isFsfLibre": False,
"isOsiApproved": False,
}
default_dict = {
"isDeprecatedLicenseId": False,
"isFsfLibre": False,
......@@ -131,7 +135,7 @@ class AppConfig(django.apps.AppConfig):
return (readable, flags, licence_dicts)
else:
# We could not find a valid licence
return ("Unknown", [default_dict])
return ("Unknown", default_flags, [default_dict])
@classmethod
def get_licence_dict(cls):
......
......@@ -25,13 +25,13 @@ django.setup()
# -- Project information -----------------------------------------------------
project = "AlekSIS-Core"
copyright = "2019-2022 The AlekSIS team"
copyright = "2019-2023 The AlekSIS team"
author = "The AlekSIS Team"
# The short X.Y version
version = "3.0"
version = "3.1"
# The full version, including alpha/beta/rc tags
release = "3.0.1.dev0"
release = "3.1.1"
# -- General configuration ---------------------------------------------------
......
[tool.poetry]
name = "AlekSIS-Core"
version = "3.0.1.dev0"
version = "3.1.1"
packages = [
{ include = "aleksis" }
]
......@@ -86,7 +86,7 @@ django-celery-beat = "^2.2.0"
django-celery-email = "^3.0.0"
django-jsonstore = "^0.5.0"
django-polymorphic = "^3.0.0"
django-colorfield = "^0.8.0"
django-colorfield = "^0.9.0"
django-bleach = "^3.0.0"
django-guardian = "^2.2.0"
rules = "^3.0"
......@@ -135,6 +135,7 @@ sentry = ["sentry-sdk"]
[tool.poetry.dev-dependencies]
aleksis-builddeps = {version=">=2023.1.dev0", allow-prereleases=true}
selenium = "<4.10.0"
uwsgi = "^2.0"
[tool.poetry.scripts]
......