Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • hansegucker/AlekSIS-Core
  • pinguin/AlekSIS-Core
  • AlekSIS/official/AlekSIS-Core
  • sunweaver/AlekSIS-Core
  • sggua/AlekSIS-Core
  • edward/AlekSIS-Core
  • magicfelix/AlekSIS-Core
7 results
Show changes
Commits on Source (6)
......@@ -1506,8 +1506,8 @@ msgstr ""
msgid ""
"\n"
" To start using a token generator, please use your\n"
" smartphone to scan the QR code below. For example, use Google\n"
" Authenticator. Then, enter the token generated by the app.\n"
" favourite two factor authentication (TOTP) app to scan the QR code below.\n"
" Then, enter the token generated by the app.\n"
" "
msgstr ""
......
......@@ -1655,14 +1655,14 @@ msgstr ""
msgid ""
"\n"
" To start using a token generator, please use your\n"
" smartphone to scan the QR code below. For example, use Google\n"
" Authenticator. Then, enter the token generated by the app.\n"
" favourite two factor authentication (TOTP) app to scan the QR code below.\n"
" Then, enter the token generated by the app.\n"
" "
msgstr ""
"\n"
" Um mit dem Codegenerator zu starten, benutzen Sie bitte Ihr Smartphone,\n"
"um diesen QR-Code zu scannen (z. B. den Google Authenticator). Dann geben Sie \n"
"den in der App angezeigten Code an:\n"
" Um mit dem Codegenerator zu starten, benutzen Sie bitte Ihre\n"
"App für Zwei-Faktor-Authentifizierung (TOTP), um diesen QR-Code zu scannen.\n"
"Dann geben Sie den in der App angezeigten Code an:\n"
" "
#: templates/two_factor/core/setup.html:34
......
......@@ -1558,8 +1558,8 @@ msgstr ""
msgid ""
"\n"
" To start using a token generator, please use your\n"
" smartphone to scan the QR code below. For example, use Google\n"
" Authenticator. Then, enter the token generated by the app.\n"
" favourite two factor authentication (TOTP) app to scan the QR code below.\n"
" Then, enter the token generated by the app.\n"
" "
msgstr ""
......
......@@ -1631,8 +1631,8 @@ msgstr ""
msgid ""
"\n"
" To start using a token generator, please use your\n"
" smartphone to scan the QR code below. For example, use Google\n"
" Authenticator. Then, enter the token generated by the app.\n"
" favourite two factor authentication (TOTP) app to scan the QR code below.\n"
" Then, enter the token generated by the app.\n"
" "
msgstr ""
......
......@@ -1505,8 +1505,8 @@ msgstr ""
msgid ""
"\n"
" To start using a token generator, please use your\n"
" smartphone to scan the QR code below. For example, use Google\n"
" Authenticator. Then, enter the token generated by the app.\n"
" favourite two factor authentication (TOTP) app to scan the QR code below.\n"
" Then, enter the token generated by the app.\n"
" "
msgstr ""
......
......@@ -1505,8 +1505,8 @@ msgstr ""
msgid ""
"\n"
" To start using a token generator, please use your\n"
" smartphone to scan the QR code below. For example, use Google\n"
" Authenticator. Then, enter the token generated by the app.\n"
" favourite two factor authentication (TOTP) app to scan the QR code below.\n"
" Then, enter the token generated by the app.\n"
" "
msgstr ""
......
// This is the AlekSIS service worker
const CACHE = "aleksis-cache";
const precacheFiles = [
'',
];
// This is the AlekSIS service worker
const offlineFallbackPage = '/offline';
const CACHE = 'aleksis-cache';
const avoidCachingPaths = [
'/admin',
'/settings',
'/accounts/login'
]; // TODO: More paths are needed
const offlineFallbackPage = 'offline/';
function pathComparer(requestUrl, pathRegEx) {
return requestUrl.match(new RegExp(pathRegEx));
......@@ -40,10 +31,7 @@ self.addEventListener("install", function (event) {
event.waitUntil(
caches.open(CACHE).then(function (cache) {
console.log("[AlekSIS PWA] Caching pages during install.");
return cache.addAll(precacheFiles).then(function () {
return cache.add(offlineFallbackPage);
});
return cache.add(offlineFallbackPage);
})
);
});
......@@ -95,11 +83,11 @@ function fromCache(event) {
}
function updateCache(request, response) {
if (!comparePaths(request.url, avoidCachingPaths)) {
if (response.headers.get('cache-control') && response.headers.get('cache-control').includes('no-cache')) {
return Promise.resolve();
} else {
return caches.open(CACHE).then(function (cache) {
return cache.put(request, response);
});
}
return Promise.resolve();
}
......@@ -22,8 +22,8 @@
<p>
{% blocktrans %}
To start using a token generator, please use your
smartphone to scan the QR code below. For example, use Google
Authenticator. Then, enter the token generated by the app.
favourite two factor authentication (TOTP) app to scan the QR code below.
Then, enter the token generated by the app.
{% endblocktrans %}
</p>
<p>
......
......@@ -18,6 +18,7 @@ from .util.core_helpers import is_celery_enabled
urlpatterns = [
path("", include("django_prometheus.urls")),
path("", include("pwa.urls"), name="pwa"),
path("offline/", views.offline, name="offline"),
path("about/", views.about, name="about_aleksis"),
path("admin/", admin.site.urls),
path("data_management/", views.data_management, name="data_management"),
......
......@@ -7,7 +7,9 @@ from django.core.paginator import Paginator
from django.http import HttpRequest, HttpResponse, HttpResponseNotFound
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from django.utils.translation import gettext_lazy as _
from django.views.decorators.cache import never_cache
import reversion
from django_tables2 import RequestConfig, SingleTableView
......@@ -112,6 +114,7 @@ class SchoolTermListView(SingleTableView, PermissionRequiredMixin):
template_name = "core/school_term/list.html"
@method_decorator(never_cache, name="dispatch")
class SchoolTermCreateView(AdvancedCreateView, PermissionRequiredMixin):
"""Create view for school terms."""
......@@ -123,6 +126,7 @@ class SchoolTermCreateView(AdvancedCreateView, PermissionRequiredMixin):
success_message = _("The school term has been created.")
@method_decorator(never_cache, name="dispatch")
class SchoolTermEditView(AdvancedEditView, PermissionRequiredMixin):
"""Edit view for school terms."""
......@@ -230,6 +234,7 @@ def groups(request: HttpRequest) -> HttpResponse:
return render(request, "core/group/list.html", context)
@never_cache
@permission_required("core.link_persons_accounts")
def persons_accounts(request: HttpRequest) -> HttpResponse:
"""View allowing to batch-process linking of users to persons."""
......@@ -250,6 +255,7 @@ def persons_accounts(request: HttpRequest) -> HttpResponse:
return render(request, "core/person/accounts.html", context)
@never_cache
@permission_required("core.assign_child_groups_to_groups")
def groups_child_groups(request: HttpRequest) -> HttpResponse:
"""View for batch-processing assignment from child groups to groups."""
......@@ -287,6 +293,7 @@ def groups_child_groups(request: HttpRequest) -> HttpResponse:
return render(request, "core/group/child_groups.html", context)
@never_cache
@permission_required("core.edit_person", fn=objectgetter_optional(Person))
def edit_person(request: HttpRequest, id_: Optional[int] = None) -> HttpResponse:
"""Edit view for a single person, defaulting to logged-in person."""
......@@ -325,6 +332,7 @@ def get_group_by_id(request: HttpRequest, id_: Optional[int] = None):
return None
@never_cache
@permission_required("core.edit_group", fn=objectgetter_optional(Group, None, False))
def edit_group(request: HttpRequest, id_: Optional[int] = None) -> HttpResponse:
"""View to edit or create a group."""
......@@ -418,6 +426,7 @@ def announcements(request: HttpRequest) -> HttpResponse:
return render(request, "core/announcement/list.html", context)
@never_cache
@permission_required(
"core.create_or_edit_announcement", fn=objectgetter_optional(Announcement, None, False)
)
......@@ -485,6 +494,7 @@ class PermissionSearchView(PermissionRequiredMixin, SearchView):
return render(self.request, self.template, context)
@never_cache
def preferences(
request: HttpRequest,
registry_name: str = "person",
......@@ -570,6 +580,7 @@ def delete_group(request: HttpRequest, id_: int) -> HttpResponse:
return redirect("groups")
@never_cache
@permission_required(
"core.change_additionalfield", fn=objectgetter_optional(AdditionalField, None, False)
)
......@@ -635,6 +646,7 @@ def delete_additional_field(request: HttpRequest, id_: int) -> HttpResponse:
return redirect("additional_fields")
@never_cache
@permission_required("core.change_grouptype", fn=objectgetter_optional(GroupType, None, False))
def edit_group_type(request: HttpRequest, id_: Optional[int] = None) -> HttpResponse:
"""View to edit or create a group_type."""
......