Skip to content
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

Update server.php #20

Merged
merged 3 commits into from
Jun 16, 2022
Merged

Update server.php #20

merged 3 commits into from
Jun 16, 2022

Conversation

Vilhjalmr26
Copy link
Contributor

Make htaccess login be used for path to lists.
If no user is logged in, will use the data folder.
Otherwise will use a username subfolder in the data folder.
Will create the folder if it doesnt exist.
This makes adding a user as simple as adding a new user to the .htpasswd file. Once they login, new folder will be created and they can start making todo lists.

Make htaccess login be used for path to lists.
If no user is logged in, will use the data folder.
Otherwise will use a username subfolder in the data folder.
@chr15m
Copy link
Member

chr15m commented Jun 15, 2022

@Vilhjalmr26 thank you for your contribution. This looks cool but it will break for people with existing installs. Perhaps you could put a check to see if there is data in the data directory already. If there is then use the data dir, otherwise use your username trick.

@Vilhjalmr26
Copy link
Contributor Author

How would you feel about an environment variable, that if set would use the new code, and otherwise would behave in the previous fashion?

@chr15m
Copy link
Member

chr15m commented Jun 15, 2022

@Vilhjalmr26 yep that works for me, thanks!

@chr15m
Copy link
Member

chr15m commented Jun 15, 2022

@Vilhjalmr26 that said I do like your idea as the default for new installations. 🤔 Also would you mind putting a sentence in the documentation about the change?

Update to add environment variable TODO_PER_USER_FOLDERS
if set to "TRUE", uses new per user folders.
If not set, or anything but "TRUE" uses old method
@chr15m
Copy link
Member

chr15m commented Jun 15, 2022

Looks great, thanks!

Update for new per user folder behavior
@Vilhjalmr26
Copy link
Contributor Author

added to the readme, if there is somewhere else desired, I can add there too.
Also, if it is desired for this to be the desired behavior, can always update the code to do it this way unless the variable is set false, that way default behavior would be new way, and you could add env var to go back to old. Makes no difference to me

@chr15m chr15m merged commit cdc49e3 into AppMini:master Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants