feat: per-user auto directory creation #676
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per-user auto directory creation
Description
as #657 mentioned
auto create user directory while creating new user.
Limitation
there are 2 conditions we need to consider
when creating a new user (with auto dir creation enabled):
condition 1.1
for example:
add new user
foo
and leave the scope dir to the default user scope.
,and
auto directory creation
option was enabled,suggest if we have the following startup command:
then the user's default scope dir will be:
and the real path on the system will be:
condition 1.2
another condition is the default user scope != server root path, but user scope = default user scope
for example:
we set the
default user scope
to./bar
underGlobal settings
when we add a user
foo
andauto directory creation
option was enabled,the user's default scope dir will be:
and the real path on the system will be:
condition 2
for example:
add new user
foo
and set the scope dir to./special
, and leave global settingsdefault user scope
still.
we do create the dir this time , but do not follow the default path creation logic.
the user's default scope dir will be:
and the real path on the system will be:
frontend assets PR is at filebrowser/frontend#102