gocast
gocast copied to clipboard
Target not correct for user notifications
Describe the bug
When creating a "user notification" via the tumlive web-app, you should be able to define who the notification should be sent to (e.g., admin: target=5, lecturers: target=4, students target=3, loggedIn target=2, allUsers target=1). However, when doing so, internally it currently always sets the target to 1 targeting always all users.
To Reproduce Steps to reproduce the behavior:
- Go to the admin dashboard (localhost:8081/admin)
- Click on user notifications (localhost:8081/admin/notifications)
- Create a new user notification targeting "Loggedin users", "Students", "Lecturers" or "Admins" and when checking the records in the db, the target is always set to
1 - (See screenshots below)
Expected behavior
When creating a "user notification" via the tumlive web-app, you should be able to define who the notification should be sent to (e.g., admin: target=5, lecturers: target=4, students target=3, loggedIn target=2, allUsers target=1).
Screenshots
Create notification for "Admins" -> Target set to 1 instead of 5
Create notification for "Lecturers" -> Target set to 1 instead of 4.
Create notification for "Students" -> Target set to 1 instead of 3.
Create notification for "Loggedin users" -> Target set to 1 instead of 2.
Desktop:
- OS: Manjaro Linux x86_64
- Browser: Mozilla Firefox
- Version: 121.0
Additional context
-
It may be that this issue occurs only locally and not on the deployed https://live.rbg.tum.de server, but an admin (/someone who can create notifications) would have to test this.
-
The issue appears to not be on the client's side as the client sends the correct target:
-
The issue seems to be with the
createNotificationmethod, which doesn't bind the correct notification target resulting in the default target value (1) being used