-
Notifications
You must be signed in to change notification settings - Fork 113
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
Public Shares CRUD, File Public Shares Manager #681
Merged
Merged
Changes from 18 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
c3e9ef4
set permissions from phoenix
refs 7ac248a
CRUD operations on public shares
refs 41676b3
WIP persistent shares storage
refs bee35ad
json public share manager
refs 5f8a0df
fix filter, add locally scoped var
refs a7bb4e6
liberate mutex on defer
refs 9b6cc77
correct time parsing on creation
refs b7499d5
hide expired public shares
refs 613e636
use correct timestamp on create and update
refs 9cdada6
add comment for future generations
refs c1cb793
get shares by token working
refs bb642fa
defer mutex unlock, refactor GetShare
refs 2ad8bf1
use mutex on get public share
refs 8503ee3
code style
refs 6e53187
Merge branch 'master' into public-shares
refs ac9ab44
address linter
refs 6c84f2a
navigation working
refs 6c118b2
folder navigation on a public share is now supported
refs a8fe9ee
remove spurious lines
refs da5a7d2
attempt to create db file if not exists
refs b160fcd
base64 encode password
refs 52c9d2d
in memory grant manager as a proof of concept
refs 20dfb8b
remove spurious code
refs 8bfcc03
make use of err, get rid of ineffectual assignment
refs 2baa43e
run go mod tidy
refs 8159d06
Merge branch 'master' into public-shares
refs e46fb64
update golangci to 1.26.0
refs ef3549a
update golangci-lint counterpart on Makefile
refs e071712
force cache invalidation for golangci-lint
refs d918fa7
add user to request context, handlePropfind depends on the context user
refs 9729151
use [public] share manager driver instead of the gateway, as it is an…
refs 40ab8cb
update golangci-lint on build-onlly and build-and-publish-docker pipe…
refs 575fee7
ignore jsonpb on golangci.yaml
refs 4cff37e
get rid of metadata-password-passing hack
refs 5a0a73a
remove comments
refs a7746f0
Merge branch 'master' into public-shares
refs 9b6adc7
use a db file for link.Grant
refs 455e6da
fix linter
refs 58e0b25
Merge branch 'master' into public-shares
refs 21dbf29
fix propfind stack
refs a07b579
defer usage of ref
refs 39f3fc5
Fix PROPFIND with Depth 1
7fd06cf
Merge pull request #1 from PVince81/public-shares
refs 72fba4b
Merge branch 'master' into public-shares
refs 68c1932
publicshare: commit grant
labkode f395902
Merge pull request #2 from labkode/refs-hugo
refs df39963
adapt db json file marshal / unmarshal
refs d6eaa1c
remove deadcode
refs 91bf637
remove yet more dead code
refs e42564b
remove unused config parameter
refs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WIP. We need to persist the grant for basic authentication password checking. Still need to figure out whether to commit it to the storage or find another way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @refs I don't think we need to commit the grant to storage for a public share, keeping it outside the storage is good enough. User accessing a public link they cannot access the storage directly anyway. What can be stored in the storage is a reference to the public link ID as metadata.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes a clean separation of concerns. Currently the password is stored on a link.Grant, that is required at the moment of a PublicShare creation, but the PublicShare itself does not include a Grant, by design. So in short, where would you think it would be a good way to store this? We were thinking on the public shares auth provider.
/cc @butonic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump. This is the only opinionated bit that needs to be resolved before having a functional persistent public shares storage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the time being I'm running with an in-memory map for the lack of decision here. This should NOT be adopted in production, but as a proof of concept does the job on checking
Basic
credentials with the stored public share grants.