Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3e5e243ddf | |||
| 8176cea8fe | |||
| b71f2e9089 | |||
| 1331afa4da |
@@ -12241,9 +12241,6 @@ def test_push_notification():
|
||||
if 'username' not in session:
|
||||
return jsonify({'success': False, 'error': 'Not authenticated'}), 401
|
||||
|
||||
if not us.is_admin(session['username']):
|
||||
return jsonify({'success': False, 'error': 'Admin access required'}), 403
|
||||
|
||||
try:
|
||||
data = request.get_json(silent=True) or {}
|
||||
target_user = data.get('target_user', session['username'])
|
||||
|
||||
@@ -37,14 +37,14 @@ def send(email: list | str, subject: str, note: str, sender: str) -> bool:
|
||||
<tr>
|
||||
<td>
|
||||
<p style="margin:0 0 12px 0;">Mit freundlichen Grüßen</p>
|
||||
<p style="margin:0;"><strong style="font-size:16px;">Automatisierter Email Verteiler für die Schule: {cfg.get_school_info().get("name")}</strong><br></p>
|
||||
<p style="margin:0;"><strong style="font-size:16px;">Automatisierter Email Verteiler für die Schule: {cfg.get_school_info().get("name")}</strong><br></p><br>
|
||||
<p style="margin:12px 0 0 0;"><strong>Invario UG</strong><br>Am Sportplatz 10<br>83052 Bruckmühl</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
"""
|
||||
|
||||
text_content = f"{body_message}\n\nMit freundlichen Grüßen\n{sender}\nInvario UG"
|
||||
text_content = f"{body_message}\n\nMit freundlichen Grüßen\n{sender}\n"
|
||||
|
||||
html_content = f"""
|
||||
<html>
|
||||
|
||||
@@ -252,8 +252,8 @@ def new(date_start: str, date_end: str, time_span: list, slots, slot_length, use
|
||||
if calendar_link:
|
||||
email_body += f"\n\nKalendereintrag: {calendar_link}"
|
||||
|
||||
if normalized_mail and cfg.EMAIL_ENABLED:
|
||||
mail_service.send(normalized_mail, subject, email_body)
|
||||
#if normalized_mail and cfg.EMAIL_ENABLED:
|
||||
mail_service.send(normalized_mail, subject, email_body, f"Terminplanungssystem {cfg.SCHOOL_INFO_DEFAULT.get("name")}")
|
||||
|
||||
return {
|
||||
'appointment_id': id_str,
|
||||
|
||||
@@ -142,7 +142,7 @@ def save_push_subscription(username, subscription_obj):
|
||||
# Create unique hash of subscription using plaintext data to avoid duplicates
|
||||
sub_hash = hashlib.shake_256(
|
||||
f"{username}:{endpoint}".encode('utf-8')
|
||||
).hexdigest()
|
||||
).hexdigest(32)
|
||||
|
||||
# Check if subscription already exists by Hash
|
||||
existing = subs_col.find_one({
|
||||
@@ -197,7 +197,7 @@ def remove_push_subscription(username, endpoint):
|
||||
|
||||
sub_hash = hashlib.shake_256(
|
||||
f"{username}:{endpoint}".encode('utf-8')
|
||||
).hexdigest()
|
||||
).hexdigest(32)
|
||||
|
||||
result = subs_col.update_one(
|
||||
{'SubscriptionHash': sub_hash},
|
||||
|
||||
@@ -1823,7 +1823,7 @@
|
||||
{ label: 'Orte verwalten', keywords: ['orte verwalten', 'orte', 'location'], url: {{ url_for('manage_locations')|tojson }} },
|
||||
{% endif %}
|
||||
|
||||
{% if current_permissions.pages.get('admin_school_settings', False) %}
|
||||
{% if current_permissions.actions.get('can_manage_settings', False) %}
|
||||
{ label: 'Schulstammdaten', keywords: ['schule', 'settings', 'stammdaten', 'school settings'], url: {{ url_for('admin_school_settings')|tojson }} },
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user