drawpile / Drawpile

A collaborative drawing program
http://drawpile.net/
GNU General Public License v3.0
1.03k stars 130 forks source link

Censor layer/Layers Hiding (Usability(?)/discussion) #1181

Closed amoruwu closed 8 months ago

amoruwu commented 8 months ago

This is more for discussion around censor layer and how to make it useful since I have nothing better to do other than discuss this. and add a more collaboration features to layers! I was thinking about how the censor layer is hardly/rarely used due to when a layer is censored you can't add more censor or remove censoring while a layer is censored so it can't be used by users to censor parts of the canvas. image

Not true, you can draw on censored layers just fine as long as you have "show censored layers" option selected. This layer flag allows you to set the flag first, before drawing anything, without having to remember to maintain a maintain a separate censor layer manually. -Cella callaa https://github.com/drawpile/Drawpile/issues/734#issuecomment-479026003

UI locked when a censored layer is selected: impossible to accidentally draw on the wrong layer/and one must remember to update it to cover the areas that should be hidden. -Cella callaa https://github.com/drawpile/Drawpile/issues/448#issue-222002014

Apparently there was an option to draw on censored layers? I think it should be enabled by default and the censoring should be live and not updated. We'll return to this later.

Logically it's purpose (If you can't use it to censor parts of the canvas) could be for operators to censor a layer when someone draws something crude on it so other users don't see it. But there is a much faster and better alternative option to do this for operators which is : turning the opacity to 0. So a more logical purpose is for normal users to use it to censor their things. Or for operators to censor the whole board or part of it etc. But more cool use case for it is hide parts peoples drawings for collaborative competition drawings fog of war ETC! But since: Users can just un-censor the layer or hide it if image is not enabled. There are many ways to cheat.

I've had thoughts as to have an option to lock layers as shown for users. image On normal layers and censor layers. When a reset happens the censor layers will load first, But a user can just export the session as .psd or .pdf ETC or leave the session and get all the permissions they need. The ideas I had to stop the circumventing were 1: image disallow exporting/saving of sessions and wipe the canvas when disconnecting out of the board. 2: Just not loading whatever is under the censor. So even if a session is exported or the user leaves whatever under the censor can't be seen.

Both of these ideas are silly but I thought I would mention them. This idea of locking layer visibility has been mentioned before and the issues of it have been dissected, before as well. https://github.com/drawpile/Drawpile/issues/894#issue-615063204

It's a flawed idea. The user who wants to cheat would just select the layer below, copy it and paste it somewhere else and they'd get to see everything, the purpose of your idea got defeated... And we are stuck with wacky board owners forcing a mask on their canvas cutting your drawing area. -notfood

Yes, that! Also it bears mentioning that all a user would have to do is disconnect from the session "on accident" and they'd have a perfectly usable full copy that wouldn't be bound by those rules any longer. Therefore making the option useless in its intentWade821

A much simpler idea that could work is : Having a NSFW/Censor layer that can only be seen the contents of by users that have permission to draw on it. Aka have the censor on the layers themselves and not a layer over them. And have that censor impossible to un-censor unless you have permission to use the layer. Exporting the session as a PDF won't work since the censor is on the layer itself, You would need to un-censor it before exporting. This would work also for art competitions challenges, NSFW sessions that want to hide it's contents (By censoring all layers other than the rules.) until they can trust that you're 18+, Fog of war for whatever dnd players are out there By just moving whatever can be seen onto a different uncensored layer.

The only thing that would remain is just leaving the session and getting all of the permissions you need only solutions I can think of for this would be not loading what's actually on the censored layer until you have permission to un-censor it. Or wiping it if you disconnect while a layer is still censored. Only loading it when you have permission to un-censor it can come with issues like lag when you do get permission, actually knowing weather you can un-censor it or not, adding traffic etc. or having image forever enabled if you leave without getting permission to un-censor the layer. Though that can get weird. All up for discussion just had to give my thoughts on it.

askmeaboutlo0m commented 8 months ago

The censor is on the layer itself. Layers with that option set will censor their contents unless you explicitly show them. That can be done through View → Show Censored Layers. You can draw on a censored layer when this option is enabled. That you can't draw on a censored layer while it's censored is intentional, the censor isn't there to be a separate layer with a pattern on it, it's there to actually censor the contents of a layer, so drawing on a layer while it's censored doesn't make much sense.

Disallowing uncensoring of layers is a parental controls setting. I don't think it's spectacularly useful, since sessions with inappropriate content would still need to be marked NSFM, but it's there. You can lock parental control settings behind a password.

Denying users the ability to control which layers they are allowed to hide or if they're allowed to see or to save their board is not sensible. You could always work around not being allowed to save by copying every individual layer, for example. Or take a screenshot. Or just make a recording and open that instead. Restricting uncensoring of layers doesn't make sense for the same reasons, if you got a recording, wiping the canvas upon disconnect gains you nothing.

Hiding it on the network level is also not possible because it desynchronizes the clients. You can't undo and redo correctly if you're not synchronized, so showing and hiding censored layers entirely separate session histories. Switching between them would basically be a session reset for that client, but resetting the entire session for toggling that option is not feasible.

That PSDs export censored layers plain is a bug, they should export what you see.

amoruwu commented 8 months ago

Man it took my forever and I couldn't find the view censor thing. Anyway most people do use it as 'separate layer with a pattern on it' to censor things. It's not clear how it should be used,,

I did write this weirdly with my thought process and thoughts on it lol. What I meant is like what you say: have it where you can draw in the censored layer, and everyone who doesn't have permission to draw on that layer won't see what you're drawing instead of a view option image, Which would make the censor tool more useful. This would be useful in censoring things from users who aren't trusted, and making collaboration challenges etc. Discussion is more about the the issue of it being easily circumvented by just leaving the session and getting all the permissions you need to see whatever was censored.

Anyway glad I was helpful in someway to find that bug!

askmeaboutlo0m commented 8 months ago

Yeah I get that, it's just not something that can be done. Session permissions can only restrict what you can do within that session, as soon as you disconnect, permissions don't apply anymore. Trying to make them carry over is not possible for the reasons mentioned above: the session contents must be transmitted to all clients so that they're in sync and once a client has the session contents, they can exfiltrate them.

Putting any kind of "protections" on the client side, like wiping the canvas when you disconnect or disallowing saving files, would just be smoke and mirrors. The user can just patch their client to e.g. remove the canvas wipe. Even without manipulating the client, you can just dump the network traffic that Drawpile receives and that will give you a session recording. So you couldn't actually rely on any of those "protections", which would be a security issue by design.

So I don't think any of this is going to happen, since it's simply at odds with how Drawpile works.

But the PSD bug is fixed now, thanks for reporting that! I'll close this issue now, since I don't think there's a way ahead on the discussion.