Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing privacy modes #96

Closed
14 tasks done
cryptix opened this issue Mar 23, 2021 · 3 comments · Fixed by #100 or #200
Closed
14 tasks done

Implementing privacy modes #96

cryptix opened this issue Mar 23, 2021 · 3 comments · Fixed by #100 or #200
Assignees
Labels
Go golang related stuff

Comments

@cryptix
Copy link
Member

cryptix commented Mar 23, 2021

Documentation

https://ssb-ngi-pointer.github.io/rooms2/#stakeholders
https://ssb-ngi-pointer.github.io/rooms2/#privacy-modes
https://ssb-ngi-pointer.github.io/rooms2/#participation

background:
#12

implementation implications

The room server needs to support the three modes (open, community, restricted).

Areas where privacy mode needs to be considered:

  • invites
  • connection establishment
  • Aliases: restricted rooms don't support aliases, because restricted means to be completely shut off from the public
  • more?

remaining

the following tasks are what remains. they may be implemented in #100 or in a separate follow-up pr

ideas

First round: start server with a command line flag for the target privacy mode, expose in the interface what the current privacy mode is

☑️ add type RoomConfig interface { ... } to package roomdb but do not implement it in sqlite in the first pass of things.

type RoomConfig interface {
    GetPrivacyMode(context.Context) (PrivacyMode, error)
}

where type PrivacyMode similar to roomdb.RoleMember enum etc

What actions are regulated by the privacy mode, and where?

how to get the role of a member:
https://github.com/ssb-ngi-pointer/go-ssb-room/blob/07feacb5587e2baa912b8203909cf41fa6f0a672/web/handlers/admin/members.go#L81-L86

later (persistence)

  • Add a SetPrivacyMode(ctx, mode) error to the RoomConfig interface
  • Add a new table by creating a new file in sqlite/migrations (probably 3-room-config.sql)
    (the increasing numbers are just a convention to understand the order better)
  • Run bash ./generate-models.sh in roomdb/sqlite to update the models package
  • Start using the generated model of the new table to implement RoomConfig

and of course:

TESTS!!
@cryptix cryptix added the Go golang related stuff label Mar 23, 2021
@staltz
Copy link
Member

staltz commented Mar 23, 2021

implementation implications

Restricted rooms don't support aliases, because they're meant to be completely shut off from the public.

@cryptix
Copy link
Member Author

cryptix commented Mar 23, 2021

Right, thanks! Update the outline above.

@cryptix
Copy link
Member Author

cryptix commented Apr 6, 2021

Reopening since this is a tracking issue for all the features.

Notable PR #100 is missing UI for changing the modes and lots of tests to make sure they work as intended across all the features.

@cryptix cryptix reopened this Apr 6, 2021
@cblgh cblgh mentioned this issue Apr 7, 2021
@cblgh cblgh changed the title Start implementing privacy modes Implementing privacy modes Apr 12, 2021
@staltz staltz added this to the NGIp milestone milestone Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Go golang related stuff
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants