-
Notifications
You must be signed in to change notification settings - Fork 49
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
Enforce separate "comment" permission on Sandstorm. #39
Conversation
I used to work on Google Docs sharing. One thing I helped implement there was the ability to grant "comment" permission independently of "read" and "write". Originally we only let editors comment, but users made it very clear that they wanted to grant comment permission without write permission. On the other hand, giving comment permission to all readers (as ep_comments currently does) is also not great, because it means public documents end up littered with spam. Overhauling Etherpad's basic sharing model to include "comment-only" links (separate from the existing read-only links) would probably be a big project. I have not done that here. However, on Sandstorm, the sharing model is controlled by the platform. The app merely declares what permissions exist, and then Sandstorm provides the UI for users to share various permissions. So, on Sandstorm, we can trivially add a "comment" permission, and I have done so. This change extends ep_comments with the minimal changes needed to enforce the Sandstorm comment-only permission. I could maintain this as a fork, but the change should be harmless to merge upstream, and this would be a lot easier for me to maintain.
Instead of using the sandstorm namespace/variable this should be generic IE "header" as the variable name then the permission header attribute should be set by the admin in settings.json -- This would mean anyone could leverage this functionality irrespective of the service rewriting to Etherpad. |
I'm happy to restructure this to be more reusable, but I'll need to know exactly what you want to avoid "wrong rock" syndrome. I'm not quite sure I understand your comment. I think you are saying:
Is that right? Alternatively, it might be more consistent with the current approach to add |
You nailed it on the head :) |
*bump @kentonv |
Hey, sorry, I'm pretty swamped so it's likely I won't work on this again until the next time I sit down to update the Sandstorm Etherpad packaging, and even then I might just maintain it as a fork for now. |
@kentonv want me to spend an hour or sorting it out and add it to my SS hours? |
Sure, if you're confident that you understand Sandstorm's requirements here. The relevant changes I made to Etherpad core are:
If I can remove those and use a |
Btw this is pretty much done just been busy w/ other stuff so haven't committed anything -_- |
Gah I'm not gonna get these commits merged, the TLDR was I moved everything to settings.json -- The soonest I can look into this again is late August. Sorry man things just got crazy busy here and I need to drop some tasks! |
Sure, no rush on this since I have a working solution that I can maintain as a fork. |
I'm gonna close this with the goal to move the conversation to Etherpad core |
I used to work on Google Docs sharing. One thing I helped implement there was the ability to grant "comment" permission independently of "read" and "write". Originally we only let editors comment, but users made it very clear that they wanted to grant comment permission without write permission. On the other hand, giving comment permission to all readers (as ep_comments currently does) is also not great, because it means public documents end up littered with spam.
Overhauling Etherpad's basic sharing model to include "comment-only" links (separate from the existing read-only links) would probably be a big project. I have not done that here.
However, on Sandstorm, the sharing model is controlled by the platform. The app merely declares what permissions exist, and then Sandstorm provides the UI for users to share various permissions. So, on Sandstorm, we can trivially add a "comment" permission, and I have done so.
This change extends ep_comments with the minimal changes needed to enforce the Sandstorm comment-only permission. I could maintain this as a fork, but the change should be harmless to merge upstream, and this would be a lot easier for me to maintain.