mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Move permission for LIST_COMMENTS to dev/tu block
In commit 3578e77ad4
we implemented
listing of comments from the account details page , but this was
intended to only be available to TUs and Devs. As the comment says:
"display the comment list if they're a TU/dev"
The credential checking code, however, set this credential for all
users, contrary to the intention of the commit.
In order to preserve the ability to list a person's own comments, also
declare the allowed uids based on the profile being viewed.
This commit is contained in:
parent
7f008b0bc4
commit
3ac958ac01
3 changed files with 3 additions and 3 deletions
|
@ -167,7 +167,7 @@ if (isset($_COOKIE["AURSID"])) {
|
|||
}
|
||||
|
||||
} elseif ($action == "ListComments") {
|
||||
if (has_credential(CRED_ACCOUNT_LIST_COMMENTS)) {
|
||||
if (has_credential(CRED_ACCOUNT_LIST_COMMENTS, array($row["ID"]))) {
|
||||
# display the comment list if they're a TU/dev
|
||||
|
||||
$total_comment_count = account_comments_count($row["ID"]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue