Skip to content
Snippets Groups Projects
Commit e661de08 authored by Weblate's avatar Weblate
Browse files

Merge remote-tracking branch 'origin/master'

parents c8587c8a d48cdf84
No related branches found
No related tags found
1 merge request!1279Translations update from Weblate
Pipeline #135000 passed with warnings
......@@ -9,7 +9,31 @@ and this project adheres to `Semantic Versioning`_.
Unreleased
----------
Changes
Fixed
~~~~~
* Notifications were not properly shown in the frontend.
* When navigating from legacy to legacy page, the latter would reload once for no reason.
`3.1.1` - 2023-07-01
--------------------
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 +41,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 +93,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 +1139,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
......@@ -21,7 +21,7 @@
</message-box>
<iframe
v-else
:src="'/django' + $route.path + queryString"
:src="iFrameSrc"
:height="iFrameHeight + 'px'"
class="iframe-fullsize"
@load="load"
......@@ -41,6 +41,7 @@ export default {
data: function () {
return {
iFrameHeight: 0,
iFrameSrc: undefined,
};
},
computed: {
......@@ -53,13 +54,16 @@ export default {
},
},
methods: {
getIFrameURL() {
const location = this.$refs.contentIFrame.contentWindow.location;
const url = new URL(location);
return url;
},
/** Handle iframe data after inner page loaded */
load() {
// Write new location of iframe back to Vue Router
const location = this.$refs.contentIFrame.contentWindow.location;
const url = new URL(location);
const path = url.pathname.replace(/^\/django/, "");
const pathWithQueryString = path + encodeURI(url.search);
const path = this.getIFrameURL().pathname.replace(/^\/django/, "");
const pathWithQueryString = path + encodeURI(this.getIFrameURL().search);
const routePath =
path.charAt(path.length - 1) === "/" &&
this.$route.path.charAt(path.length - 1) !== "/"
......@@ -71,7 +75,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
......@@ -101,15 +107,33 @@ export default {
},
},
watch: {
$route() {
$route(newRoute) {
// Show loading animation once route changes
this.$root.contentLoading = true;
// Only reload iFrame content when navigation comes from outsite the iFrame
const path = this.getIFrameURL().pathname.replace(/^\/django/, "");
const routePath =
path.charAt(path.length - 1) === "/" &&
newRoute.path.charAt(path.length - 1) !== "/"
? newRoute.path + "/"
: newRoute.path;
if (path !== routePath) {
this.$refs.contentIFrame.contentWindow.location =
"/django" + this.$route.path + this.queryString;
} else {
this.$root.contentLoading = false;
}
// Scroll to top only when route changes to not affect form submits etc.
// A small duration to avoid flashing of the UI
this.$vuetify.goTo(0, { duration: 10 });
},
},
mounted() {
this.iFrameSrc = "/django" + this.$route.path + this.queryString;
},
name: "LegacyBaseTemplate",
};
</script>
......
<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
unreadNotifications.length > 0
"
>
mdi-bell-badge-outline
......@@ -86,5 +86,12 @@ export default {
pollInterval: 30000,
},
},
computed: {
unreadNotifications() {
return this.myNotifications.person.notifications
? this.myNotifications.person.notifications.filter((n) => !n.read)
: [];
},
},
};
</script>
{
myNotifications: whoAmI {
person {
unreadNotificationsCount
notifications {
id
title
......
# 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.2.dev0"
# -- General configuration ---------------------------------------------------
......
[tool.poetry]
name = "AlekSIS-Core"
version = "3.0.1.dev0"
version = "3.1.2.dev0"
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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment