mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Introduced `get|post` `/passreset` routes. These routes mimic the behavior of the existing PHP implementation, with the exception of HTTP status code returns. Routes added: GET /passreset POST /passreset Routers added: aurweb.routers.accounts * On an unknown user or mismatched resetkey (where resetkey must == user.resetkey), return HTTP status NOT_FOUND (404). * On another error in the request, return HTTP status BAD_REQUEST (400). Both `get|post` routes requires that the current user is **not** authenticated, hence `@auth_required(False, redirect="/")`. + Added auth_required decorator to aurweb.auth. + Added some more utility to aurweb.models.user.User. + Added `partials/error.html` template. + Added `passreset.html` template. + Added aurweb.db.ConnectionExecutor functor for paramstyle logic. Decoupling the executor logic from the database connection logic is needed for us to easily use the same logic with a fastapi database session, when we need to use aurweb.scripts modules. At this point, notification configuration is now required to complete tests involved with notifications properly, like passreset. `conf/config.dev` has been modified to include [notifications] sendmail, sender and reply-to overrides. Dockerfile and .gitlab-ci.yml have been updated to setup /etc/hosts and start postfix before running tests. * setup.cfg: ignore E741, C901 in aurweb.routers.accounts These two warnings (shown in the commit) are not dangerous and a bi-product of maintaining compatibility with our current code flow. Signed-off-by: Kevin Morris <kevr@0cost.org>
52 lines
1.5 KiB
Text
52 lines
1.5 KiB
Text
; Configuration file for aurweb development.
|
|
;
|
|
; Options are implicitly inherited from conf/config.defaults, which lists all
|
|
; available options for productions, and their default values. This current file
|
|
; overrides only options useful for development, and introduces
|
|
; development-specific options too.
|
|
|
|
[database]
|
|
backend = sqlite
|
|
name = YOUR_AUR_ROOT/aurweb.sqlite3
|
|
|
|
; Alternative MySQL configuration (Use either port of socket, if both defined port takes priority)
|
|
;backend = mysql
|
|
;name = aurweb
|
|
;user = aur
|
|
;password = aur
|
|
;host = localhost
|
|
;port = 3306
|
|
;socket = /var/run/mysqld/mysqld.sock
|
|
|
|
[options]
|
|
aurwebdir = YOUR_AUR_ROOT
|
|
aur_location = http://127.0.0.1:8080
|
|
disable_http_login = 0
|
|
enable-maintenance = 0
|
|
localedir = YOUR_AUR_ROOT/web/locale
|
|
|
|
[notifications]
|
|
; For development/testing, use /usr/bin/sendmail
|
|
sendmail = YOUR_AUR_ROOT/util/sendmail
|
|
sender = notify@localhost
|
|
reply-to = noreply@localhost
|
|
|
|
; Single sign-on; see doc/sso.txt.
|
|
[sso]
|
|
openid_configuration = http://127.0.0.1:8083/auth/realms/aurweb/.well-known/openid-configuration
|
|
client_id = aurweb
|
|
client_secret =
|
|
|
|
[php]
|
|
; Address PHP should bind when spawned in development mode by aurweb.spawn.
|
|
bind_address = 127.0.0.1:8081
|
|
|
|
; Directory containing aurweb's PHP code, required by aurweb.spawn.
|
|
htmldir = YOUR_AUR_ROOT/web/html
|
|
|
|
[fastapi]
|
|
; Address uvicorn should bind when spawned in development mode by aurweb.spawn.
|
|
bind_address = 127.0.0.1:8082
|
|
|
|
; Passphrase FastAPI uses to sign client-side sessions.
|
|
session_secret = secret
|