mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
9e6b861b6f
commit
03c6304e19
24 changed files with 187 additions and 237 deletions
|
@ -6,11 +6,10 @@ include_once('pkgfuncs.inc.php');
|
|||
$SID = $_COOKIE['AURSID'];
|
||||
$pkgname = htmlspecialchars($_GET['N']);
|
||||
$votes = pkgbase_votes_from_name($pkgname);
|
||||
$atype = account_from_sid($SID);
|
||||
|
||||
html_header(__("Voters"));
|
||||
|
||||
if ($atype == 'Trusted User' || $atype== 'Developer'):
|
||||
if (has_credential(CRED_PKGBASE_LIST_VOTERS)):
|
||||
?>
|
||||
|
||||
<div class="box">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue