Commit graph

1810 commits

Author SHA1 Message Date
Lukas Fleischer
34aa226c66 Do not allow regular users to edit all accounts
Fixes a regression introduced in 03c6304 (Rework permission handling,
2014-07-15).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:33 +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
f4ee1278e5 Clean up user references in user_delete()
Explicitly clean up all references before deleting a user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:32 +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
16e4708f1e Update message catalog
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 17:53:30 +02:00
Lukas Fleischer
a18843761f po/POTFILES: Remove pkgbuild-parser.inc.php
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 17:53:30 +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
48ae736068 Prevent merging a package base with itself
Instead of deleting the package, show an error message if a user tries
to merge a package base with itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 17:53:28 +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
ed1e747847 Verify that the target of merge operations exists
Make sure that the target of a merge operation is either empty or an
existing package base name.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 15:11:59 +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
9048030da7 Drop support for source packages without .AURINFO
Disallow uploading source tarballs that do not contain .AURINFO. Also,
drop the PKGBUILD parser which is no longer needed.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 10:48:48 +02:00
Lukas Fleischer
c36f0e885a Automatically accept orphan requests for old packages
If an orphan request is filed for a package that has been flagged
out-of-date for at least 180 days, it is disowned automatically.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-17 16:57:04 +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
e9b13cef3f Mention the target of merge requests in emails
When sending the initial notification email for a merge request, include
the name of the package base that is the target of the requested merge
operation.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 11:11:23 +02:00
Lukas Fleischer
42d927366a Use Cc instead of Bcc in request notifications
Add the request creator and the current package maintainer to Cc instead
of Bcc when sending notification emails for package requests. This
allows users to forward any discussion to both of them by using the
"Group Reply" function of their MUA.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 11:09:55 +02:00
Lukas Fleischer
bfb253ef72 Bcc notification emails to the request creator
Add both the request creator and the current package maintainer to the
Bcc list of notification emails for package requests.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 11:09:30 +02:00
Lukas Fleischer
f8343e5a68 Remove unused function pkg_details_by_name()
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 10:33:01 +02:00
Johannes Dewender
2cff0d3455 home: requests should be filed in the web interface
There is a "file request" link in the "Package Actions" box
for every package.

Signed-off-by: Johannes Dewender <arch@JonnyJD.net>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 23:01:47 +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
1b901616dc Disallow privileged users to use invalid user names
Prevent Trusted Users and developers from accidentally using a name that
contains invalid characters. Also, remove user_is_privileged() which is
no longer needed after this change.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 22:56: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
9e6b861b6f Release 3.3.0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-05 15:16:54 +02:00
Lukas Fleischer
e071b94b8b Translation updates from Transifex
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-05 15:16:15 +02:00
Lukas Fleischer
de61c4a1cd Update message catalog
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 12:30:26 +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
b113764b0b Sanitize merge base name in pkgreq_file()
Move the check introduced in 06b7099 (Validate package base name when
filing requests, 2014-07-02) from pkgbase.php to pkgreq_file().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:25:37 +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
743f13e92d Include reason for closing a request in the subject
Change the subject of notification emails sent when closing a request to
be either "Request Accepted" or "Request Rejected".

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:10:51 +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
5f234469a5 Update message catalog
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:31:13 +02:00
Lukas Fleischer
436eabf39c Remove extra space from text buttons in Firefox
Fixes FS#41052.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:28:08 +02:00
Lukas Fleischer
a1733fc746 po/POTFILES: Add missing files
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:26:38 +02:00
Lukas Fleischer
a149fc493f Fix pagination in the package request list
This was not implemented properly in commit 8260111 (Add a package
request list, 2014-06-24).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:23:27 +02:00
Lukas Fleischer
64c4e51698 pkgbase.php: Highlight error messages
Make sure that error messages above the package list are actually
visible to the user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:23:25 +02:00
Lukas Fleischer
06b7099357 Validate package base name when filing requests
Make sure that the package base to merge into does not contain any
invalid characters.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:22:51 +02:00
Lukas Fleischer
e141c6c38c Fix title in package requests list
Use "Requests" instead of "File Request" as title for the package
request list.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:02:41 +02:00
Lukas Fleischer
7b57e0e1b3 Set Message-ID when sending package request emails
When sending the first notification email that belongs to a certain
package request, set the Message-ID instead of the In-Reply-To and
References headers. This is not only more RFC compliant but also fixes
thread views in several clients, such as Pipermail.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 22:29:40 +02:00
Lukas Fleischer
4186e42a39 Remove Reply-To header from package request emails
These notification emails are sent to a public mailing list for
discussion. Make sure that people can reply.

Reported-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 22:27:13 +02:00
Lukas Fleischer
61939d1ed7 Release 3.2.0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 21:35:36 +02:00
Lukas Fleischer
0baca92944 Translation updates from Transifex
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 21:35:05 +02:00
Lukas Fleischer
8535435595 Move user statistics table to the right
Display user statistics under the general package statistics table.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 21:17:14 +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
81eee971e6 Update message catalog
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 20:11:27 +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
707b1bb878 Fix documentation of pkgreq_*() return types
Reported-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 19:47:21 +02:00