| Age | Commit message (Collapse) | Author |
|
To make a githook that can run on alpine images (using musl) they
need to be cross-compiled. Then it became apparent that the githook
binary was pulling in all the same dependencies as the server was.
This is not good, but apparently also not something Rust/Cargo has
figured out. RFC:s has been shutdown. workspace might be an option
but then I probably need to also add a "code shared by both githook
and server" library that both can link. Problem for another day.
|
|
|
|
|
|
Next step is to generate authorized_keys files for git server
based on keys.
|
|
|
|
|
|
|
|
hooks handle delete and fast forward rules.
|
|
Want to support any authentication for the git server, so use git
commiter as username for creating reviews instead of the local user
that logged in to git.
Also verify that pushed commits has a valid author in pre-receive.
This is tricky as pre-receive must do this check in the hook, because
pre-receive runs when before the objects are pushed so the server
can't read the commits, the hook must do this.
|
|
|
|
Use testdir to create directories to put test git in.
Use custom test method to find githook binary.
Stop using remote so that git repo doesn't try to fetch.
|
|
|
|
Pushing a commit to a new branch creates a review.
Each project has its own git directory, with githooks installed
that talkes with server process via unix sockets.
|
|
Non existent projects, users and such.
|
|
User: username must be unique, use as primary key and drop id.
|
|
Preparing for git connection.
|
|
auth module switching implementation based on cfg(test)
|
|
|
|
Non-test auth is now using ldap for account syncing and authentication.
Test auth is still using hardcoded users (user and other). But it is
now also possible to login as "other".
|
|
Use project_check_maintainer correctly, should not panic (by .unwrap)
but forward the error (by ?).
|
|
Also add /users endpoint.
|
|
Must be <version>_<description>.sql.
|
|
While doing that I realized I had forgotten to declare maintainers
for projects. Also added default roles and changed so that review_users
only contains overrides, so that changes to the project users is
instantly applied to all reviews (unless there is an override).
|
|
|
|
|
|
Let auth::stage() deal with having to clone the string
It shouldn't force the caller to create a String object.
|
|
|
|
The actual authentication is still fake.
|
|
Also move reviews to under project to make it obvious that projectid
is just that.
|
|
|
|
|
|
|