summaryrefslogtreecommitdiff
path: root/web/html
AgeCommit message (Collapse)Author
2014-07-29Fix the registration formLukas Fleischer
Pass the right parameters to display_account_form() and process_account_form() when showing/processing the registration form. Fixes a regression introduced in 03c6304 (Rework permission handling, 2014-07-15). Reported-by: Karthik K <hashken.distro@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25Add support for deleting user accountsLukas Fleischer
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-25Make deleted comments visible to Trusted UsersLukas Fleischer
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-23Add typeahead suggest to the merge request formLukas Fleischer
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-23Prevent merging a package base with itselfLukas Fleischer
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-23Drop support for source packages without .AURINFOLukas Fleischer
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-16Fix pkgbase_votes_from_name()Lukas Fleischer
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-15home: requests should be filed in the web interfaceJohannes Dewender
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-15Rework permission handlingLukas Fleischer
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-04Sanitize merge base name in pkgreq_file()Lukas Fleischer
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-04Allow for adding a comment when closing a requestLukas Fleischer
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-04Allow for selecting a reason when closing a requestLukas Fleischer
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-02Remove extra space from text buttons in FirefoxLukas Fleischer
Fixes FS#41052. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02Fix pagination in the package request listLukas Fleischer
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-02pkgbase.php: Highlight error messagesLukas Fleischer
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-02Validate package base name when filing requestsLukas Fleischer
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-02Fix title in package requests listLukas Fleischer
Use "Requests" instead of "File Request" as title for the package request list. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01Move user statistics table to the rightLukas Fleischer
Display user statistics under the general package statistics table. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01Be explicit about accepted requests in emailsLukas Fleischer
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-01Simplify code to bound integer valuesLukas Fleischer
Suggested-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-30Rename package request functions to pkgreq_*()Lukas Fleischer
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-25Move package request form to a templateLukas Fleischer
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25Allow regular users to file package requestsLukas Fleischer
Move the permission check so that regular users can file requests, whereas the request list is only available to Trusted Users and developers. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25Add support for merge requestsLukas Fleischer
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-25Add an accept button to the package request listLukas Fleischer
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-25Allow for closing package requestsLukas Fleischer
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-25Add a package request listLukas Fleischer
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-25Add support for filing package requestsLukas Fleischer
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-05Do not return "None" in user functionsLukas Fleischer
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-05Collapse long source listsLukas Fleischer
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-05-22Avoid overflow in updates tableLukas Fleischer
Fixes FS#40206. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-22Be friendly to newly registered usersLukas Fleischer
Use "Welcome to the Arch User Repository" instead of "AUR Password Reset" as subject for the initial password reset email. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-06Check permissions when uploading source packagesLukas Fleischer
All files contained in the source tarball must have permissions of 644 or 755. All directories must have permissions of 755. Implements FS#27754. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-06pkgsubmit.php: Style fixesLukas Fleischer
Move some elseif statements to the same line as the closing brace. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-05-03Fix parsing of array overridesLukas Fleischer
If a depends (makedepends, checkdepends, optdepends, conflicts, provides, replaces, license, groups, source) line appears in a package section, it replaces the corresponding array from the pkgbase section. If there is a single "depends = " line in the package section, the depends array of that package is considered empty. This partly reverts the behavior introduced in commit 137a9ae (Fix parsing of array overrides, 2014-05-03). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-26pkgsubmit.php: Redirect to package base detailsLukas Fleischer
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-26Support multiple licenses per packageLukas Fleischer
Split out package licenses into two separate tables in order to support multiple licenses per package. The code on the package details page is adjusted accordingly. UPGRADING contains instructions on how to convert existing licenses in the database to the new layout. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-26Store package groups in the databaseLukas Fleischer
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-26Store conflicts, provides and replaces in the DBLukas Fleischer
Package conflicts, provides and replaces are now stored in the new PackageRelations table. The gendummydata script generates test entries for these relations. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-19Handle pkgbase array overrides gracefullyLukas Fleischer
Instead of overwriting arrays, such as depends, from the pkgbase section, new entries should be appended. Replace array_merge() with a mixture of array_merge_recursive() and array_replace_recursive() that merges array fields and replaces non-array fields. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-18Collapse long dependency listsLukas Fleischer
Collapse package dependency lists with more than 20 entries and add a link to show the full list. The JavaScript code for this originates from the archweb project. Note that the full list is shown when JavaScript is disabled or unavailable. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-17Store {make,check,opt}depends in the databaseLukas Fleischer
In addition to parsing and storing dependencies of packages, store makedepends, checkdepends and optdepends. Every dependency (of any type) is displayed on the package details page. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05pkgbase.php: Append query string when redirectingLukas Fleischer
Add the query string when redirecting to the package details page. This fixes the target of the "All comments" link of non-split packages. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05Do not show package base page of non-split packagesLukas Fleischer
When trying to access the package base page of non-split packages, redirect to the package details page since the package base page doesn't contain any additional information in that case. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05Add full package list to the removal formLukas Fleischer
In addition to naming the package base that is going to be removed or merged, list every single package that is affected. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05Prefix package functions with pkg_/pkgbase_Lukas Fleischer
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05Use snake case for all package functionsLukas Fleischer
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05Move package actions to package basesLukas Fleischer
Package actions now operate on package bases instead of packages. Move all actions to the correct locations. This also fixes some issues with comment notifications. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05Only parse PKGBUILD when requiredLukas Fleischer
Instead of always parsing the PKGBUILD, only invoke the parser when there is no meta data (.AURINFO) available. This speeds up the general case (packages including meta data). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05Factor out PKGBUILD parsingLukas Fleischer
This is legacy code. Move it to a separate source file in order to clean up the submission code. The code will be removed altogether in an upcoming release. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>