Commit graph

86 commits

Author SHA1 Message Date
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
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
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
c64b51f2ee voters.php: Show time stamps if available
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-17 09:53:02 +02:00
Lukas Fleischer
e9ebcc4479 Add a time stamp to package base votes
This can potentially be used to identify trending packages.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-16 18:15:45 +02:00
Lukas Fleischer
0613a637b3 Fix notification handling on submission and adoption
Automatically add users to the notification list when adopting a
package. This used to work bug was broken by 03c6304 (Rework permission
handling, 2014-07-15). Fixes FS#41426.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-06 00:09:05 +02:00
Lukas Fleischer
c70b340c41 Close requests before accepting
When auto-accepting a request, we need to close the package request
before performing the actual action (disown/deletion/merge). Otherwise,
the former maintainer is not included in the Cc list of the
acceptance/rejection notification email.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 17:59:26 +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
d03f7a890f Fix pkgbase_votes_from_name()
In 676595f (Prefix package functions with pkg_/pkgbase_, 2014-04-05),
votes_for_pkgname() was renamed to pkgbase_votes_from_name() without
changing the semantics. Slightly adapt the implementation and interpret
the argument as a package base name instead of a package name. Also fix
the call site.

Reported-by: Felix Yan <felixonmars@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 19:22:58 +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
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
0d513e1468 Be explicit about accepted requests in emails
When sending notification emails after closing a request, be explicit
about whether the request has been accepted or not.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 20:06:41 +02:00
Lukas Fleischer
a48739508c Fix broken indentation in pkgbase_delete_comment()
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-30 08:57:05 +02:00
Lukas Fleischer
74a82bb2fb Rename package request functions to pkgreq_*()
Since these functions now reside in a separate module, use the module
name as function name prefix.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-30 08:49:46 +02:00
Lukas Fleischer
dde0482d10 Split out package request functions
Move package request functions to a separate unit pkgreqfuncs.inc.php.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-30 08:47:59 +02:00
Lukas Fleischer
278e6be4eb Prefix request notification mails with ID
Add a "[PRQ#n]" prefix to each package request notification mail. PRQ is
an abbreviation for "Package Request" and n is replaced with the
corresponding package request ID.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 21:54:36 +02:00
Lukas Fleischer
c8818a693d Send notification mail when closing a request
The mail is sent to the request mailing list and to the current package
maintainer.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 21:48:22 +02:00
Lukas Fleischer
0e84667c33 Add threading headers to request notification mails
This allows for grouping mails that belong to the same request.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 21:45:02 +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
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
839bff3761 Use aur.archlinux.org in sender email addresses
Consistently use the following headers in notification emails:

    Reply-to: noreply@aur.archlinux.org
    From: notify@aur.achlinux.org

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-22 15:43:41 +02:00
Thomas Weißschuh
8658bf22aa Add threading headers to notification mail
It is only basic, but works in this way for other platforms.
It works because MUAs are able to reconstruct threads originating from mails
they don't know about (unknown Message-ID).

This has some drawbacks:
* MUAs might show the missing start of the thread. As a normal user of a
  package never got *all* notifications of a package anyways it only reflects
  the reality
* Missing notifications go unnoticed. This is no regression so it should be
  fine

Those could be fixed by including all previous comments in 'References:',
which would require to have predictable 'Message-ID:' for notification mails.
This would require more code and more database accesses at runtime.

Could also be used for out of date notifications.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-20 21:58:36 +02:00
Lukas Fleischer
a93363ac08 Add a packager field to packages
Store the last packager in addition to storing the submitter and the
maintainer of a package. This allows for checking who last updated a
package, even if the package has been disowned.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-06 20:52:32 +02:00
Lukas Fleischer
32b5d46643 Fix misuses of pkgbase_from_pkgid()
All pkgbase_*() functions should operate on package base IDs. Drop the
superfluous (and incorrect) parameter conversion from package IDs to
package base IDs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-06 18:42:00 +02:00
Lukas Fleischer
5b5a5f343e Fix pkgbase_user_voted()
pkgbase_user_voted() should expect a package base ID, not a package ID.
Change the SQL query accordingly.

This fixes the vote status on package base pages.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-06 18:41:23 +02:00
Lukas Fleischer
c004429023 Refactor pkgbase_categories()
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 19:58:00 +02:00
Lukas Fleischer
5415bc945a Refactor pkgbase_comments()
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 19:52:51 +02:00
Lukas Fleischer
122636cbb6 Refactor pkgbase_comments_count()
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 19:52:51 +02:00
Lukas Fleischer
1486f8067a pkgbasefuncs.inc.php: Fix leftover bits
Fix some places that incorrectly referred to packages instead of package
bases.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 16:10:53 +02:00
Lukas Fleischer
ee1048b268 Split out package base functions
Move functions operating on package bases to a separate file.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 15:58:44 +02:00