Commit graph

15 commits

Author SHA1 Message Date
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
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
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
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
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
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
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