scrumlr.io
scrumlr.io copied to clipboard
improvement: Split the messaging channel between user and moderator/owner
Description
Splitted up the board subscription into two channels. Prior every user subscribed to boards.<boardID>
now based on the role each user connects to boards.<boardID>.participant
or boards.<boardID>.moderator
.
Why? To avoid sending events to participants they don't have access to.
Changelog
api/boards_listen_on_board.go
- clients and subscriptions are now stored in a map based on their roles
- running each channel in it's own goroutine
- added method to change channels when participants role gets updated.
- added mutex to BoardSubscription struct to avoid concurrent access on the websockets.
event_filter.go
- change the method signature to b *Boardsubscription to be uniform
- added if clause for realtime.BoardEventParticipantUpdated to cache updated user
board_sessions_observer.go
- columns and notes included in the parameters of UpdateSession -> must be passed on in order to be able to send Column_Update and Notes_Sync events.
- added db calls to get notes and columns from board
database/columns.go
- storing the column to be deleted in context to check later if this column_delete event should be send to all participant or only mods/owner
database/columns_observer.go
- added the column to be deleted to the params of DeleteColumn to later check if this column is hidden or not
database/notes.go
- storing the note to be deleted in the context to later check if this note is in a hidden column or not
database/notes_observer.go
- added note and columns as parameters to DeletedNote call
realtime/boards.go
- Added SessionChannel type for the two channels
- Edited BroadcastToBoard() to be able to broadcast to multiple channels
- BroadcastToBoard() and GetBoardChannel() now now subscribe/listen to
boards.<boardID>.moderator/participant
services/...
- Fixed all services by adding channels when calling realtime.BroadcastToBoard
- in some cases the event should only be sent to the moderators -> DeletedColumns, DeletedNote in order to send the event to the correct channel, it's necessary to check if the column is hidden or not.
services/boards/sessions.go
- UpdatedSession -> added two more broadcasts that are needed when a participants role gets updated to display hidden columns and their notes.
Checklist
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] The light- and dark-theme are both supported and tested
- [x] The design was implemented and is responsive for all devices and screen sizes
- [x] The application was tested in the most commonly used browsers (e.g. Chrome, Firefox, Safari)
(Optional) Visual Changes
🐙 Octomind
Test Report: 0/14 successful.
description | status | details |
---|---|---|
About Section Visibility Test | Failed ❌ | click |
change avatar | Failed ❌ | click |
check Privacy Policy | Failed ❌ | click |
check terms & conditions | Failed ❌ | click |
close cookie banner - front page | Failed ❌ | click |
close cookie banner - sign-in | Failed ❌ | click |
create and delete board columns | Failed ❌ | click |
create_and_delete_notes_and_actions_v2 | Failed ❌ | click |
create lean coffee board | Failed ❌ | click |
edit_notes_and_actions_v5 | Failed ❌ | click |
get started | Failed ❌ | click |
share_session | Failed ❌ | click |
sign-in | Failed ❌ | click |
test all ways to open the setup flow | Failed ❌ | click |
commit sha: f7733ad
🐙 Octomind
Test Report: 0/14 successful.
description | status | details |
---|---|---|
About Section Visibility Test | Failed ❌ | click |
change avatar | Failed ❌ | click |
check Privacy Policy | Failed ❌ | click |
check terms & conditions | Failed ❌ | click |
close cookie banner - front page | Failed ❌ | click |
close cookie banner - sign-in | Failed ❌ | click |
create and delete board columns | Failed ❌ | click |
create_and_delete_notes_and_actions_v2 | Failed ❌ | click |
create lean coffee board | Failed ❌ | click |
edit_notes_and_actions_v5 | Failed ❌ | click |
get started | Failed ❌ | click |
share_session | Failed ❌ | click |
sign-in | Failed ❌ | click |
test all ways to open the setup flow | Failed ❌ | click |
commit sha: f7733ad
🐙 Octomind
Test Report: 6/14 successful.
description | status | details |
---|---|---|
About Section Visibility Test | Passed ✅ | click |
change avatar | Failed ❌ | click |
check Privacy Policy | Passed ✅ | click |
check terms & conditions | Passed ✅ | click |
close cookie banner - front page | Passed ✅ | click |
close cookie banner - sign-in | Passed ✅ | click |
create and delete board columns | Failed ❌ | click |
create_and_delete_notes_and_actions_v2 | Failed ❌ | click |
create lean coffee board | Failed ❌ | click |
edit_notes_and_actions_v5 | Failed ❌ | click |
get started | Passed ✅ | click |
share_session | Failed ❌ | click |
sign-in | Failed ❌ | click |
test all ways to open the setup flow | Failed ❌ | click |
commit sha: f7733ad
🐙 Octomind
Test Report: 6/14 successful.
description | status | details |
---|---|---|
About Section Visibility Test | Passed ✅ | click |
change avatar | Failed ❌ | click |
check Privacy Policy | Passed ✅ | click |
check terms & conditions | Passed ✅ | click |
close cookie banner - front page | Passed ✅ | click |
close cookie banner - sign-in | Passed ✅ | click |
create and delete board columns | Failed ❌ | click |
create_and_delete_notes_and_actions_v2 | Failed ❌ | click |
create lean coffee board | Failed ❌ | click |
edit_notes_and_actions_v5 | Failed ❌ | click |
get started | Passed ✅ | click |
share_session | Failed ❌ | click |
sign-in | Failed ❌ | click |
test all ways to open the setup flow | Failed ❌ | click |
commit sha: f7733ad
🐙 Octomind
Test Report: 6/14 successful.
description | status | details |
---|---|---|
About Section Visibility Test | Passed ✅ | click |
change avatar | Failed ❌ | click |
check Privacy Policy | Passed ✅ | click |
check terms & conditions | Passed ✅ | click |
close cookie banner - front page | Passed ✅ | click |
close cookie banner - sign-in | Passed ✅ | click |
create and delete board columns | Failed ❌ | click |
create_and_delete_notes_and_actions_v2 | Failed ❌ | click |
create lean coffee board | Failed ❌ | click |
edit_notes_and_actions_v5 | Failed ❌ | click |
get started | Passed ✅ | click |
share_session | Failed ❌ | click |
sign-in | Failed ❌ | click |
test all ways to open the setup flow | Failed ❌ | click |
commit sha: aeedb3d
🐙 Octomind
Test Report: 6/14 successful.
description | status | details |
---|---|---|
About Section Visibility Test | Passed ✅ | click |
change avatar | Failed ❌ | click |
check Privacy Policy | Passed ✅ | click |
check terms & conditions | Passed ✅ | click |
close cookie banner - front page | Passed ✅ | click |
close cookie banner - sign-in | Passed ✅ | click |
create and delete board columns | Failed ❌ | click |
create_and_delete_notes_and_actions_v2 | Failed ❌ | click |
create lean coffee board | Failed ❌ | click |
edit_notes_and_actions_v5 | Failed ❌ | click |
get started | Passed ✅ | click |
share_session | Failed ❌ | click |
sign-in | Failed ❌ | click |
test all ways to open the setup flow | Failed ❌ | click |
commit sha: afaf300
🐙 Octomind
Test Report: 6/14 successful.
description | status | details |
---|---|---|
About Section Visibility Test | Passed ✅ | click |
change avatar | Failed ❌ | click |
check Privacy Policy | Passed ✅ | click |
check terms & conditions | Passed ✅ | click |
close cookie banner - front page | Passed ✅ | click |
close cookie banner - sign-in | Passed ✅ | click |
create and delete board columns | Failed ❌ | click |
create_and_delete_notes_and_actions_v2 | Failed ❌ | click |
create lean coffee board | Failed ❌ | click |
edit_notes_and_actions_v5 | Failed ❌ | click |
get started | Passed ✅ | click |
share_session | Failed ❌ | click |
sign-in | Failed ❌ | click |
test all ways to open the setup flow | Failed ❌ | click |
commit sha: 812fe4a
Splitted up the board subscription into two channels. Prior every user subscribed to
boards.<boardID>
now based on the role each user connects toboards.<boardID>.participant
orboards.<boardID>.moderator
. Why? To avoid sending events to participants they don't have access to.
I think I've noted it before, but I think it would be better if every user continued to have boards.<boardID>
subscribed. Moderators additionally have boards.<boardID>.moderator
subscribed. This prevents us from sending more or less the same information in two different channels.
Splitted up the board subscription into two channels. Prior every user subscribed to
boards.<boardID>
now based on the role each user connects toboards.<boardID>.participant
orboards.<boardID>.moderator
. Why? To avoid sending events to participants they don't have access to.I think I've noted it before, but I think it would be better if every user continued to have
boards.<boardID>
subscribed. Moderators additionally haveboards.<boardID>.moderator
subscribed. This prevents us from sending more or less the same information in two different channels.
If we were to have the moderators subscribe to a second channel just for moderator information, we would have to write a new filter that removes the public data, or we would be sending the same information twice. So I thought it would be a better approach to use the already existing event_filter and just split the channels. Issue #3413 also suggests splitting the channel, if I understand correctly
Splitted up the board subscription into two channels. Prior every user subscribed to
boards.<boardID>
now based on the role each user connects toboards.<boardID>.participant
orboards.<boardID>.moderator
. Why? To avoid sending events to participants they don't have access to.I think I've noted it before, but I think it would be better if every user continued to have
boards.<boardID>
subscribed. Moderators additionally haveboards.<boardID>.moderator
subscribed. This prevents us from sending more or less the same information in two different channels.If we were to have the moderators subscribe to a second channel just for moderator information, we would have to write a new filter that removes the public data, or we would be sending the same information twice. So I thought it would be a better approach to use the already existing event_filter and just split the channels. Issue #3413 also suggests splitting the channel, if I understand correctly
Yeah, but the intention of the issue has been that the new moderator channel will be exclusively used for the information that normal participants shouldn't see afaik
🐙 Octomind
Test Report: 6/14 successful.
description | status | details |
---|---|---|
About Section Visibility Test | Passed ✅ | click |
change avatar | Failed ❌ | click |
check Privacy Policy | Passed ✅ | click |
check terms & conditions | Passed ✅ | click |
close cookie banner - front page | Passed ✅ | click |
close cookie banner - sign-in | Passed ✅ | click |
create and delete board columns | Failed ❌ | click |
create_and_delete_notes_and_actions_v2 | Failed ❌ | click |
create lean coffee board | Failed ❌ | click |
edit_notes_and_actions_v5 | Failed ❌ | click |
get started | Passed ✅ | click |
share_session | Failed ❌ | click |
sign-in | Failed ❌ | click |
test all ways to open the setup flow | Failed ❌ | click |
commit sha: 4a7b959
The deployment to the dev cluster was successful. You can find the deployment here: https://4113.development.scrumlr.fra.ics.inovex.io This deployment is only for testing purposes and will be deleted after 1 week. To redeploy rerun the workflow. DO NOT STORE IMPORTANT DATA ON THIS DEPLOYMENT
Deployed Images
-
ghcr.io/inovex/scrumlr.io/scrumlr-frontend:sha-4a7b959
-
ghcr.io/inovex/scrumlr.io/scrumlr-server:sha-4a7b959
🐙 Octomind
Test Report: 13/14 successful.
description | status | details |
---|---|---|
About Section Visibility Test | Passed ✅ | click |
change avatar | Passed ✅ | click |
check Privacy Policy | Passed ✅ | click |
check terms & conditions | Passed ✅ | click |
close cookie banner - front page | Passed ✅ | click |
close cookie banner - sign-in | Passed ✅ | click |
create and delete board columns | Passed ✅ | click |
create_and_delete_notes_and_actions_v2 | Passed ✅ | click |
create lean coffee board | Failed ❌ | click |
edit_notes_and_actions_v5 | Passed ✅ | click |
get started | Passed ✅ | click |
share_session | Passed ✅ | click |
sign-in | Passed ✅ | click |
test all ways to open the setup flow | Passed ✅ | click |
commit sha: 4a7b959