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

Management console : download from the oid #39

Merged
merged 6 commits into from
Oct 1, 2015

Conversation

Yopai
Copy link
Contributor

@Yopai Yopai commented Aug 17, 2015

As spotted in #38, the management console didn't offer the ability to download the file content.
This PR solves that point.

Yopai added 3 commits August 18, 2015 00:03
In the magament console, the list of OIDs is enhanced with a link
allowing to download the file content.
Note the download is made with the OID as filename - as the server
doesn't know neither the filename, nor even the mime type.
Committed separately to ease handling of conflicts.
As the URL for a given OID always refer to the same content,
there's no need to make non cacheable response
@Yopai Yopai changed the title Manament console : download from the oid Management console : download from the oid Aug 17, 2015
@rubyist
Copy link
Contributor

rubyist commented Aug 17, 2015

I think there's a problem here mixing authentication. This will only work if the admin user/pass matches a "user" user/pass. The metastore Get() call is checking that. I think we need to bypass that part of authentication for the raw object stuff.

@Yopai
Copy link
Contributor Author

Yopai commented Aug 17, 2015

You're right.
(I only had in mind the case when the server is public, as that's how I intent to use it. And it works in this case, too)
Oh, while I'm thinking, too : I just saw embed-go has to be rerun, my commit included swap files.
But time to sleep for me. I'll see all that tomorrow.

Yopai added 2 commits August 19, 2015 22:46
Alow retrieval of a raw content from admin, even when the repository is not public.
@Yopai
Copy link
Contributor Author

Yopai commented Aug 19, 2015

I implemented what (I understood you) said :
I override meta_store.Get to bypass authentication by creating a UnsafeGet method (then Get is just : authentication; return UnsafeGet)

@Yopai
Copy link
Contributor Author

Yopai commented Aug 19, 2015

There could be another option : we could consider that, in a general way, if we're logged in admin, we don't need a user authentication.
I modified meta_store.authenticate this way. See attached patch. Can't attach the patch, I push the commit on the PR.

Looking at the user/password provided, first see if it corresponds to the admin ones.
If this is the case, accept getting the store without any further test.
@rubyist rubyist merged commit f1f928c into git-lfs:master Oct 1, 2015
@rubyist
Copy link
Contributor

rubyist commented Oct 1, 2015

Sorry I totally missed the extra changes you made. Thanks for the PR, it's now merged in!

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.

2 participants