Commit graph

356 commits

Author SHA1 Message Date
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
85b48ceb12 Link to the cgit log from package details
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-09 17:50:39 +01:00
Lukas Fleischer
492a5db229 Merge branch 'maint' 2015-01-07 17:35:59 +01:00
Lukas Fleischer
80ef14caa8 Fix link to package base voters
Reported-by: Bartłomiej Piotrowski <b@bpiotrowski.pl>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-07 17:35:46 +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
3d12d3888a Disallow specifying an SSH key during registration
Make sure that users confirm their email addresses before setting an
initial SSH key.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-29 21:30:25 +01:00
Lukas Fleischer
176014a5d7 Add links to public and private clone URLs
Show a public clone URL (using Git over HTTP) by default and only show
the private clone URL to the package maintainer.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-29 13:22:05 +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
1dcdd3b3ea Add public clone URLs to package details
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:12 +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
Lukas Fleischer
253e76d8cc Add support for adding SSH public keys to profiles
Users can now add an SSH public key on the account edit page. This will
later be used to authenticate users via SSH.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:12 +01:00
Lukas Fleischer
5ebf534ba7 Avoid double slashes in notification email body
Refactor some of the URI generation code to avoid double slashes in
absolute URIs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-13 15:28:54 +01:00
Lukas Fleischer
571b74b901 Always use virtual URLs
Support for non-virtual URLs has been broken for a long time and is no
longer used on the official AUR setup.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-21 11:43:31 +01:00
Lukas Fleischer
27850943bb Fix login link
Regression introduced in 76343fb (Use an INI-style configuration file,
2014-10-24).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-19 10:20:31 +01:00
Lukas Fleischer
76343fb915 Use an INI-style configuration file
Replace web/lib/config.inc.php with an INI-style configuration file.
This allows us to get rid of several globals and makes it easier to use
the same configuration file in external scripts.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-24 10:03:54 +02:00
Lukas Fleischer
a1bee1a21e Add support for architecture-specific sources
As a follow-up to 4d7da95 (Add support for architecture-specific fields,
2014-08-10), handle architecture-specific source fields as well.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-10 12:29:18 +02:00
Lukas Fleischer
4d7da95906 Add support for architecture-specific fields
This adds support for architecture-specific dependencies and relations.
Support for this has recently been added to makepkg, see commit 2b556d8
(PKGBUILD: handle arch specific attributes, 2014-07-25) in the pacman
repository for details.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-10 12:32:46 +02:00
Lukas Fleischer
2b29fa4bb0 Group dependencies by dependency type
Implements FS#40888.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-10 12:32:46 +02:00
Lukas Fleischer
7283d0fcc2 Lock fresh orphan requests
Trusted Users should almost always wait for two weeks before accepting
an orphan request. Lock orphan requests during the first two weeks.
Package bases can still be orphaned and package requests can still be
closed manually during that period of time.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 18:14:46 +02:00
Lukas Fleischer
97b7e077f1 Do not show deletion link on the registration page
In 7df8dc8 (Add support for deleting user accounts, 2014-07-25), a link
to the account deletion page was added to the account edit form. Make
sure we only show this link if the user actually wants to edit an
account and do not show this link on the account registration page.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 14:20:57 +02:00
Lukas Fleischer
7df8dc8bcb Add support for deleting user accounts
Users can now delete their own accounts by clicking a link in the
account edit form and confirming the deletion on a follow-up page.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:33 +02:00
Lukas Fleischer
daceef50eb Make deleted comments visible to Trusted Users
This allows Trusted Users to check whether a user posted a politically
incorrect comment, even if he already deleted it.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:32 +02:00
Lukas Fleischer
0a357a7d44 Add typeahead suggest to the merge request form
Add the typeahead implementation we already use for the package search
to the merge target text field. Instead of suggesting packages, suggest
package base names.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 17:53:30 +02:00
Lukas Fleischer
446d4537d4 pkgreq_results.php: Only show non-empty merge targets
In the column that contains the merge target, only display the
parentheses if the merge target is a non-empty string.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 15:25:37 +02:00
Lukas Fleischer
68abf41b94 Display correct comment count on package base page
Show the correct number of package base comments in the tool tip message
of the "Latest Comments" link.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 11:14:40 +02:00
Lukas Fleischer
088aab44ea Drop comment count from translatable message
The title "View all %s comments" becomes "View all %s comment" when
adding plural support (which is needed for other languages that have
more than one plural form). Simply remove the comment count from the
message and add it in parentheses.

Suggested-by: Safa Alfulaij <safa1996alfulaij@gmail.com>
Suggested-by: Sebastian Wilzbach <sebi@wilzbach.me>
Suggested-by: kachelaqa <kachelaqa@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 11:09:40 +02:00
Lukas Fleischer
3610f3c6a4 Add a new user group "Trusted User & Developer"
This group has full permissions on everything.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 22:58:57 +02:00
Lukas Fleischer
03c6304e19 Rework permission handling
Add a new function has_credential() that checks whether the currently
logged in user is allowed to perform a given action. Moving all
permission handling to this central place makes adding new user groups
and adjusting permissions much more convenient.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 22:56:57 +02:00
Lukas Fleischer
111d836912 Display number of pending requests in actions box
For packages with pending package requests, display the number of
requests above the "File Request" link.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 12:28:12 +02:00
Lukas Fleischer
7f29756196 Handle plurals in translations
Use ngettext() to handle plurals properly. Also, split pagination
captions into two strings.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 12:16:58 +02:00
Lukas Fleischer
87215cef00 Remember whether a request has been accepted
Store whether a package request is accepted or rejected and display the
reason of each closed request in the request list.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:24:24 +02:00
Lukas Fleischer
4645bcbacb Allow for adding a comment when closing a request
This allows Trusted Users to optionally add a comment when closing a
request. The comment is included in the notification email that is sent
to the requests mailing list.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:10:50 +02:00
Lukas Fleischer
8a465182ba Allow for selecting a reason when closing a request
When closing a package request, Trusted Users can now pick a reason
("Accepted" or "Rejected"). This allows for marking a request as
accepted, even if the corresponding package base has already been
deleted.

Also, the notification email now always explicitly states whether a
request has been accepted or closed in the message body.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:10:37 +02:00
Lukas Fleischer
61d70c1fa5 Do not ucfirst() merge base name in request list
Make sure the first character of the merge base name is not capitalized
in the package request list.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 23:08:49 +02:00
Lukas Fleischer
6a319a3be7 Fix "File Request" link in package base details
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 20:24:53 +02:00
Lukas Fleischer
5e49aca247 Do not highlight closed requests
Since d8dbad0 (Highlight package requests after 14 days, 2014-06-25),
requests, which have been created more than two weeks ago, are
highlighted. This is useful because Trusted Users are generally supposed
to wait for 14 days before accepting a request. However, it does not
help to highlight requests that have already been closed. Change the
logic so that only *open* requests which are at least 14 days old are
marked.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-28 15:59:30 +02:00
Lukas Fleischer
c82fc025e2 Move package request form to a template
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 21:34:39 +02:00
Lukas Fleischer
91e6b5cb2f Add support for merge requests
This adds a new "Merge" category to the list of available request types
and also adds a new "Merge into" field that is hidden via JavaScript
when "Deletion" or "Orphan" is selected.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:38:02 +02:00
Lukas Fleischer
959c61a77d Add an accept button to the package request list
This button allows for accepting a request, disowning the affected
package or redirecting to the package deletion page. The request is
closed automatically when the action has been performed.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:36:15 +02:00
Lukas Fleischer
d8dbad0c3e Highlight package requests after 14 days
Automatically highlight package requests after a configurable period of
time. Defaults to 14 days.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:35:42 +02:00
Lukas Fleischer
fc1db28c9b Allow for closing package requests
This allows Trusted Users to close package requests via the request
list. Also, entries are now sorted such that open requests are shown
before closed requests.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:34:31 +02:00
Lukas Fleischer
8260111bcc Add a package request list
Introduce a new navigation point "Requests" that shows a list of pending
package requests. This functionality is only available to Trusted Users.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:33:29 +02:00
Lukas Fleischer
48cc8207bf Add support for filing package requests
Add a new entry to the package actions box that allows for filing
deletion and orphan requests. When choosing that action, the user is
redirected to a new page that allows for selecting a request type and
entering a comment. When submitting the request, a new entry in the
request database is created and an email is sent to a configurable
mailing list (defaults to aur-general).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:31:11 +02:00
Lukas Fleischer
0a66f48aa1 Do not return "None" in user functions
Return null instead of the string "None" in username_from_id(),
uid_from_email() and uid_from_username().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-05 15:12:10 +02:00
Lukas Fleischer
9b5271d737 Display versioned conflicts/provides/replaces
Show the specific conflicts/provides/replaces versions in the web
interface.

Implements FS#40699.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-05 15:12:10 +02:00
Lukas Fleischer
13820d2b16 Collapse long source lists
In commit e582cfe (Collapse long dependency lists, 2014-04-18), we added
code to automatically collapse dependency and requirement lists with
more than 20 entries. Add the same functionality to source lists.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-05 15:12:10 +02:00
Lukas Fleischer
019014a3ac Add a "Search wiki" link to package details
Implements FS#33153.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-02 18:15:12 +02:00
Lukas Fleischer
d962d66d63 Add title attribute to links in updates table
As of commit ea25f98 (Avoid overflow in updates table, 2014-05-22), long
package names in the updates statistics are chopped off. Add a title
attribute so that users at least get a tooltip with the full package
name and version.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-22 20:47:32 +02:00