hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
67 stars 44 forks source link

[Spike] Feasability of Private Topics feature #6124

Open jnaviask opened 11 months ago

jnaviask commented 11 months ago

Description

One idea we've tossed around in various forms since the inception of Commonwealth was privacy features, i.e. gating read access to certain parts of the application. We once had a notion of private communities, however this was deprecated years ago. The presently proposed form, following on the heels of Gating, is "Private Topics", scoped out in this product brief.

The tl;dr: the feature is to allow admins to mark topics that are gated as "private", where only admins + users passing the requirements check can read the contents. Note that all users will be able to see the existence of the private topic (e.g. in the sidebar or through the API), so a useful term may be "protected" instead of "private".

Areas of Investigation

Private topics bring up a few key concerns:

Additional topics for research:

Deliverables

A document providing an overview of the systems design necessary to implement private topics + detailed answers to the above questions, such that we can proceed with implementation.

Timebox

4 hours ideally, 1 day if needed.

dillchen commented 9 months ago

add in additional areas for research, private chats

CowMuon commented 9 months ago

Key area for research here is the underlying permissions model, which is v much related to API unification.

Rotorsoft commented 9 months ago

We are building a small framework in libs/core that will separate validation and authorization concerns from the core domain logic. This is in preparation for the systematic refactoring of commands and queries, ideally using something like TRPC.

The reusable authorization middleware will deal with role/group based authorization, as well as membership/gating based authorization. Still a WIP.

dillchen commented 9 months ago

How long to implement Private Topics via named "small framework in libs/core"?

Estimate on story points / scope of changes?

Rotorsoft commented 9 months ago

We are just allocating 1hr a week (on Fridays) to review the new framework and make adjustments, considering we still have other tickets with higher priority. This is a common (less disruptive) approach with platform work... we will put the framework on the "shelf" for general use when ready. Guess we'll start scoping for adoption after Denver.

ForestMars commented 6 months ago

This is not currently scoped.

dillchen commented 5 months ago

Bumping this for Q3