Commit graph

665 commits

Author SHA1 Message Date
Lukas Fleischer
ee9a8f232b Allow for logging in via email address
Accept both user names and email addresses in the login prompt.

Suggested-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:18:31 +02:00
Lukas Fleischer
c5014b0752 Remove superfluous function valid_user()
This helper function was almost 100% identical to uid_from_username().
Switch to using uid_from_username(), which has a much better name and
implementation, everywhere.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:14:28 +02:00
Lukas Fleischer
396e50bdc8 Require comments when flagging packages out-of-date
Implements FS#42827.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:14:26 +02:00
Lukas Fleischer
6b7e26a2d1 Move package base flagging to a separate form
Show a separate confirmation page when flagging a package out-of-date.

Implements FS#44967.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:11:52 +02:00
Stefan Auditor
e9e9b41484 Update link to package submission documentation
Fixes FS#45942.

Signed-off-by: Stefan Auditor <stefan.auditor@erdfisch.de>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-17 04:20:45 +02:00
Marcel Korpel
095986b449 Do not allow empty comments
Fixes FS#45870.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-17 04:20:45 +02:00
Marcel Korpel
54d812ec79 pkg_comments.php: Add JavaScript function to edit comments
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
c7025054c6 Split pkg_comment_form.php so the outer box is not always included
For use in the new RPC interface to edit comments, the form shouldn't
always print a header. Create a new template pkg_comment_box.php that
prints form and box, change template pkg_comment_form.php to only
print the form.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Lukas Fleischer
c751921aff Do not use the term "unsupported" for AUR packages
We no longer use the term [unsupported] to refer to the "repository" of
AUR packages. Update texts and variable names accordingly.

Fixes FS#45381.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
8db2ff5da6 Set correct 'My Account' link after changing username
Don't print messages (and the account form) in process_account_form()
anymore, but return them to the caller. When updating accounts, this
function will be called before the headers are written.

If a username has been changed by process_account_form(), the headers
now show the updated username from the database in the 'My Account'
link. Clicking on it immediately after changing a username will no
longer lead to a non-existing URL.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
cb9c0d2477 Surround message with <p> tags
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
7927a6decd Use username from the database if one is provided by the user
This fixes a bug where the new user name input by the user was
invalid, causing the account deletion link and the form action to be
wrong.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
f2ff9782a5 Jump to latest comments after adding a comment
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
19aff5f958 Jump to comment after editing
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
9cde6b0566 Show dateline when a comment is edited or deleted
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
e331ce273c Support comment editing in the backend
Create two new actions, do_AddComment and do_EditComment. When editing
or deleting a comment, a timestamp is added.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
92e19e95f3 Add comment edit icon and form
Show an icon next to the comment deletion icon, which leads to a
comment edit form.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Marcel Korpel
8375d21210 Use SVG image for comment deletion icon
This also puts the icon to the right and the timestamp in the byline
and wipes out a repeated instance of the byline.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Johannes Löthberg
828506e868 Reindent web/html/packages with tabs
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Lukas Fleischer
9746a65473 Port notification routines to Python
Use a Python script for sending notification emails. The notification
action and additional parameters are passed via command line arguments.
For comment and package request notifications, the text is passed via
stdin.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Lukas Fleischer
b036b436aa Add support for multiple SSH public keys
Attaching more than one SSH public key to the same account is useful,
e.g. if one uses different machines to access the AUR SSH interface.
Multiple keys can now be specified by adding multiple lines to the text
area on the account edit form.

Implements FS#45469.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Acked-by: Leonidas Spyropoulos <artafinde@gmail.com>
2015-06-27 13:04:03 +02:00
Lukas Fleischer
3dbaee80b4 Move registration code to a separate unit
Until now, we used the same unit to register and edit accounts. Split
these features into separate source files for clarity. This also allows
us to redirect to the home page when a logged-in user tries to access
the registration page.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Gordian Edenhofer
6395a5d5b8 Redirect at previous page after a successful login
After the user was authenticated a redirect to the site which
linked the user to the login page is done. This fixes FS#32481.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
d841357d7f Make merge into label of width 'auto'
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
d1fe28ff7e Make confirmation label of width 'auto'
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
226376fc62 Wrap all confirmation checkbox labels in label tag
Without a label tag around the label it won't be clickable.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Marcel Korpel
d852da79e4 pkgbase_details.php/pkg_details.php: Show keywords
Keywords are hyperlinked so a user can search for other packages with
the same name and/or keyword.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-19 14:40:08 +02:00
Leonidas Spyropoulos
74c7cf70ff Add explanation for Popularity field in search results
Fixes FS#45327.

Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-15 22:37:45 +02:00
Johannes Löthberg
fd1794a737 home: Add submitting packages section
Link to the ArchWiki and lists any SSH fingerprints configured in the
AUR configuration file.

Fixes FS#45322.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:56 +02:00
Lukas Fleischer
19ee268935 Make "Learn more..." translatable
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:55 +02:00
Lukas Fleischer
5fb7a74e23 Replace categories with keywords
Remove package base categories. Instead, users can now specify up to
twenty custom keywords that are taken into consideration when searching.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:55 +02:00
Gordian Edenhofer
fe46b01519 Autofocus input fields at login and package-search
At the login and the package search page, the user is promted to
provide some input. Until now it was neccessary to first click the
field in which the input should be placed.
This can be simplified with HTML5 using the autofocus attribute of
the input element, though not included in XHTML 1.0, the attribute
was at least given a value to comply with the standard.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-12 00:12:14 +02:00
Lukas Fleischer
1537f3be1a Redesign the home page
* Make the home page look even more like the archweb home page.
* Add information on package requests.
* Improve texts on discussion and bug reporting.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 23:39:51 +02:00
Lukas Fleischer
6e514ee335 Default to ordering packages by popularity
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 19:15:51 +02:00
Lukas Fleischer
078f7256e3 Support exceptions in the maintenance mode
Allow for excluding certain IP addresses from the maintenance mode. This
allows administrators to view the web page while the site is still under
maintenance for the rest of the world.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 14:48:01 +02:00
Lukas Fleischer
a45b5073ca Implement a maintenance mode
Add support for a maintenance mode that disables both the website and
the SSH interface and can be enabled easily using a configuration
option.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 14:32:21 +02:00
Lukas Fleischer
ef142b2312 pkgbase.php: Escape error messages
Fixes FS#45284.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-10 08:54:51 +02:00
Lukas Fleischer
5c64ae1a0e Drop suffixes from confirm parameters
Remove the _delete and _disown suffixes from HTTP POST confirmation
parameters.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 09:05:05 +02:00
Lukas Fleischer
8885796e80 Show the SSH key field on the registration page
Now that we have a short explanation on how we use the SSH public key,
we can show that field on the registration page.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:31:36 +02:00
Lukas Fleischer
5b5950e51d Add more details on the SSH public key field
Also, reorder the fields such that optional fields come last.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:26:07 +02:00
Lukas Fleischer
40461eb738 Include user name in password reset emails
Fixes FS#44320.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 22:32:43 +02:00
Lukas Fleischer
c6e09def2b Fix processing of pkgbase_get_comaintainers()
pkgbase_get_comaintainers() returns an array of user names, not an array
of user IDs.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 21:14:24 +02:00
Lukas Fleischer
0b8c11a37a Move package disowning to a separate page
The disown link in the package actions box leads to a new page
(pkgdisown.php) that can be used to confirm package disowning.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 21:13:43 +02:00
Lukas Fleischer
75923205af Fix email body of password reset emails
When the password reset function was factored out in 5d31bb2 (Move reset
key submission to a separate function, 2013-03-19), a semicolon was
accidentally replaced by a concatenation operator. As a result of this,
all password reset emails sent since mid-2013 only contained a password
reset link without any description. Fix this by terminating the
assignment with a semicolon again.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-21 09:33:58 +02:00
Lukas Fleischer
cc1e8aed30 Rename the AUR software to aurweb
Rename the project to help differentiate between the software providing
access to the Arch User Repository and the collection of source packages
itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-02-04 09:50:01 +01:00
Lukas Fleischer
fc23a9bd50 Add support for package base co-maintainers
This allows for having multiple co-maintainers for AUR packages.
Co-maintainers have push access to the package base Git repository but
are not allowed to change the package base category, disown the package
or modify the list of co-maintainers. The primary maintainer of an AUR
package can edit the list of co-maintainers from the Package Actions
box.

Implements FS#17911.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-07 12:21:21 +01:00
Lukas Fleischer
ada3a8eab3 Use the AUR footer in cgit
Use the footer that is already used in other parts of the AUR website
instead of the footer from the main Arch Linux website.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-29 11:34:02 +01:00
Lukas Fleischer
8e06a607c8 Use a custom logo
Currently, the AUR sites are hard to distinguish from the official
website, especially when browsing Git repositories in cgit. Add "user
repository" to the logo to make it distinguishable from the official
site.

In order to avoid confusion, also change the link in the logo to the AUR
home page instead of the main Arch Linux website.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-29 11:30:04 +01:00
Lukas Fleischer
662f31cdb7 Add cgit configuration and style sheet
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-28 21:09:26 +01:00
Lukas Fleischer
74edb6fea9 Use Git repositories to store packages
* Remove package submission page from the web interface.
* Replace PKGBUILD and tarball links with links to cgit.
* Remove the "URLPath" field from RPC replies.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:12 +01:00