yourselfhosted / slash

An open source, self-hosted links shortener and sharing platform. Save and share your links very easily

Home Page:https://demo.slash.yourselfhosted.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default to Public

heynemann opened this issue · comments

Is your feature request related to a problem?

We won't have private URLs by default (people may use it, but not by default). Would be great if we could specify a flag saying what the default behavior should be.

Describe the solution you'd like

Add an env var DEFAULT_URL_VISIBILITY with private, workspace or public as allowed values. Use that as default in the UI.

Additional context

No response

Updated with 85848ee

Hi @boojack, can you inform us of what the .env variable and values that should work for this feature request, which looks to have been implemented in v0.5.2 docker app, according to the release notes page, that should be able to work in slash v0.5.2? I tried the variable and values that were suggested by the op, as this contents of my docker-slash .env file, where the docker-compose.yml file is located and where the app is executed from, and after restarting slash v0.5.2 (docker app) it still shows the "+ Create" (Create Shortcut) function's "Visibility" value as "Public" always after refreshing the web page and such after that, and trying to create new Slash Shortcut entries:

root@pi4:~/docker-slash$ cat .env
DEFAULT_URL_VISIBILITY=private
root@pi4:~/docker-slash$ docker-compose restart

I also do not see it as a UI setting anywhere. Perhaps I'm utilizing that flag incorrectly in the my .env file though is all I can think of. I couldn't tell from the 85848ee commit what the actual variable and values should be though. Thanks!

@jon-f-novastor In v0.5.2, we changed the initial value from private to public. But we didn't add the related configuration.

Maybe it's better to create a new issue and I'll support on it as soon as possible!

@jon-f-novastor In v0.5.2, we changed the initial value from private to public. But we didn't add the related configuration.

Maybe it's better to create a new issue and I'll support on it as soon as possible!

OK gotcha, I understand now. I was thinking that the .env solution was implemented, like what is contained in the "Describe the solution you'd like" section text that the op posted, not just a static hard coded change like what was actually implemented. No worries. I will create a separate improvement issue for that.

Edit: I created the new enhancement request for the above as: #62 (comment). Thanks!