naturalcrit / homebrewery

Create authentic looking D&D homebrews using only markdown
https://homebrewery.naturalcrit.com
MIT License
1.03k stars 316 forks source link

Block cloning #3512

Open 5e-Cleric opened 3 weeks ago

5e-Cleric commented 3 weeks ago

It'd be great if users could block the souece dropdown in the share page for their brews, as both a brew per brew basis or a user setting.

Ideally this would work like this:

I know users will still be able to get the text via dev tools, but most users would not.

Gazook89 commented 3 weeks ago

Philosophically, is non-source available brews something we want, or should all brews have their source available?

5e-Cleric commented 3 weeks ago

I think it makes sense for users to prevent others from cloning their stuff and claiming it as own by the click of a single button, lol

ericscheid commented 3 weeks ago

So long as we don't frame the option as being total protection, because it isn't,

5e-Cleric commented 3 weeks ago

Should be part of #1908

G-Ambatte commented 2 weeks ago

This is somewhat complicated... There are currently two access types, share and edit. The new Brew Locking feature I've been working on will block any attempt to access a "locked" brew via any method other than edit. However for this feature, we'd need to differentiate share based on the calling page: perhaps something like view (for /share) and source (for viewing /source, cloning to /new, and so on). It's not impossible and probably not the most difficult feature in the world to create.


Account wide protection, however, is a bit trickier. We either need to add a check against the User's account wide settings (which, specifically, don't exist at this point in time), or come up with a way for the User to update multiple (or even all) brews at once (which also does not currently exist). To be clear, I think both options will need to exist at some point in the near future. Account checks probably makes more sense; in that it has a much smaller potential DB impact than users mass updating their brews.