sandstorm-io / sandstorm

Sandstorm is a self-hostable web productivity suite. It's implemented as a security-hardened web app package manager.
https://sandstorm.io
Other
6.72k stars 705 forks source link

Embedding a Sandstorm magic sharing action in a Rocket.Chat, followed by linking to the grain, results in confused users #2721

Open paulproteus opened 7 years ago

paulproteus commented 7 years ago

Steps to reproduce:

Expected behavior:

Actual behavior:

Other notes:

Curious for other people's opinions.

kentonv commented 7 years ago

We would need the app to tell Sandstorm who is expected to get access to the embedded grain. We can't just assume the app is going to reshare the grain with everyone. For example, if I share a grain with you in a private message, it should only go to you.

Rather than introduce a new API for this, maybe what would make more sense would be for rocket.chat to detect a pasted grain link that refers to a capability that was shared previously, and automatically treat it as sharing that capability again.

Or better yet (but will take longer to implement), maybe this is all solved by the inline powerbox.

paulproteus commented 7 years ago

Is there a way to know that a grain link refers to a capability that was shared previously? How would we handle the fact that different capabilities can express different levels of access?

Just trying to understand what this option would mean, from a technical perspective:

Rather than introduce a new API for this, maybe what would make more sense would be for rocket.chat to detect a pasted grain link that refers to a capability that was shared previously, and automatically treat it as sharing that capability again.

kentonv commented 7 years ago

Is there a way to know that a grain link refers to a capability that was shared previously?

Not really, at present. Maybe in theory we could add a way to query the grain ID, or something.

How would we handle the fact that different capabilities can express different levels of access?

Probably Rocket.Chat would choose arbitrarily among previous capability-based shares of the grain.

(Honestly I don't really think this is a great idea but it's the best I could think of that seemed less hard than implementing the full inline powerbox.)

paulproteus commented 7 years ago

Sounds like there are three ideas on the table.

I think that you stated some downsides of Idea 2. Are there downsides to Idea 1, other than the fact that it requires a new API, which ideas 2 and 3 do as well?

ocdtrekkie commented 7 years ago

Is Idea 1 to automatically add everyone in a Rocket.Chat room to a grain's ACLs if the grain is linked in that room? That could work okay for rooms of four or five people like your internal team comms, but could be a terrifying mess when posted in a public room.

paulproteus commented 7 years ago

Yes-ish, @ocdtrekkie - to clarify, it's that when the special https://sandstorm.io/news/2016-10-13-sharing-documents-rocketchat + button is used, everyone in the chat room gets their ACLs updated to include the grain.

ocdtrekkie commented 7 years ago

Would that then also put it on their all grains list? I could see issues with people doing that in a public room, it would be annoying.

Even if not, sharing a grain in a room of 100 people when talking to maybe three or four people in that room would be kinda messy on the permissions side of things if you ever needed to clean it up later. Consider how many times grains are shared on Sandstorm's open IRC that are only viewed by one or two people.

I feel like the proper solution would be to handle this differently when sharing to rooms of <10 people than rooms of >10 or something, though invisible magic rule changes confuse people, and we are trying to reduce confused users in this issue. ;)

kentonv commented 7 years ago

Idea 1. Rocket.Chat gets a way to tell Sandstorm to redeem a capability for a user. (I think this is my proposal, which amounts to "update the ACLs on receipt.")

I guess you mean that when you click the + button and perform the sharing action, you want Rocket.Chat to tell Sandstorm to immediately add the grain to the global grain list for every user in the room. Hence, plain-text links to that grain will thereafter work in any context.

I'm not fundamentally against that though I wonder if it's a weird experience for big, public chats. It's weird for things to drop into my grain list because they were mentioned in some chat room that I visited months ago and am technically still a member of. This is also potentially inefficient for big rooms in that Rocket.Chat will need to make a lot of API calls every time something is shared.

I also think that this will be a fair amount of work to implement and the cost/benefit ratio is much higher than many other things we could be working on right now.