pawelmalak / snippet-box

Snippet Box is a simple self-hosted app for organizing your code snippets. It allows you to easily create, edit, browse and manage your snippets in various languages.
MIT License
969 stars 80 forks source link

Feature request: user admin #1

Open andonovski opened 3 years ago

andonovski commented 3 years ago

It would be good to have user management with separate user roles.

User roles could be simple, like Admin role, Contributor and Read only. For user management for start it would be ok to have local users, stored in DB. If project starts to grow nicely (I hope so), LDAP, SAML, OIDC, etc could be added. Of course, this requires some kind of admin panel to be developed.

It could be good to have option for users to check which snippets could be public and which ones private.

Keep up the good work

cocoonkid commented 3 years ago

+1

Starf0x commented 3 years ago

I agree, I would like to share my snippets, but on a read only fashion. 2 users could be enough, 1 admin and a read-only user.

PS, I was looking for something like this a long time, thank you for making this program.

mjhong0708 commented 3 years ago

Thank you for developing awesome app. I agree to this, too. Since I would like to store some private codes, it could be great if there is login feature.

fravia1 commented 3 years ago

Yeah login feature is definitely required for a tool like this

drtech981 commented 3 years ago

At the same would be extremely nice to integrate single sign on using LDAP or OIDC/SAML, user roles could just be global admin and read only.

Also would be nice to have the ability to share snippets with other users (simply tag allowed users).

aljawaid commented 2 years ago

im desperate to install this looking at the screenshot its exactly what the world is missing to save bits of code in an easy way...

How is everyone currently hiding it without this admin login request? I mean is everyone installing snippet-box on a local setup? I want to install it on a sub domain code.example.com or snippets.example.com but then i dont know how to hide it, unless i just do a htaccess to the directory which isnt ideal but at least i can use the software.

But then what about backup of snippets or a cron for it....

EctoBoggan commented 2 years ago

@aljawaid If you're using Nginx you can add a login screen before getting to the web page. people are also talking about Authelia here : https://github.com/pawelmalak/snippet-box/issues/44 but I don't know/use it

modem7 commented 2 years ago

@aljawaid If you're using Nginx you can add a login screen before getting to the web page. people are also talking about Authelia here : https://github.com/pawelmalak/snippet-box/issues/44 but I don't know/use it

The problem with that, is that it's not per user. It's just a front-end auth that allows anyone with the login to see everything, which doesn't really solve the issue of multiple users and limiting the snips to a certain audience.

Eg if you want a public facing snips system that either 1. Has snips as read-only for public, but write access to logged in users or 2. Specific hidden snips for certain users, then a reverse proxy auth would not allow that.

EctoBoggan commented 2 years ago

The problem with that, is that it's not per user. It's just a front-end auth that allows anyone with the login to see everything, which doesn't really solve the issue of multiple users and limiting the snips to a certain audience.

You're right, and like every body i'm waiting for this feature. but for the moment if people want to "hide" the app, this is the easiest solution that came into my mind.

asifbacchus commented 2 years ago

Other than this feature, and maybe more language (syntax) support, this project is nearly perfect :-) @pawelmalak is there anything we can do to help with the authentication feature or is it just a matter of getting around to coding it?

cocoonkid commented 2 years ago

I temporarily fixed this with putting authelia in front of my domain. But I'd love a native way.

N0AGI commented 2 years ago

first off, fantastic project and many thanks for investing your time and resources on this effort and then sharing with us all.

I would also like to pile on and say the "admin" / user management feature would be a great one to have.. I am currently limiting access to the site via nginx proxy ACL path. While that works, it does not allow me to control RO access to the people I would like to share my snippers with.

ItsNoted commented 2 years ago

PLEASE allow us to share snippets publicly as read only. It's literally the only thing stopping me from using this in production.

MBlais13 commented 1 year ago

I would love some sort of user system so anyone cant just load up the webpage and see everything!