From fe063ce0b9d905419e8b3b70c2368c6fbe34583e Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Tue, 19 Oct 2021 17:34:15 +0800 Subject: [PATCH] * Fix bug#15628. --- module/api/view/struct.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/api/view/struct.html.php b/module/api/view/struct.html.php index da6e059ce5..e90291d858 100644 --- a/module/api/view/struct.html.php +++ b/module/api/view/struct.html.php @@ -42,8 +42,8 @@ addedDate;?> createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '', '', "title='{$lang->api->edit}' class='btn'"); - echo html::a($this->createLink('api', 'deleteStruct', "libID=$libID&structID=$struct->id"), '', 'hiddenwin', "title='{$lang->api->delete}' class='btn'"); + if(common::hasPriv('api', 'edit')) echo html::a($this->createLink('api', 'editStruct', "libID=$libID&structID=$struct->id"), '', '', "title='{$lang->api->edit}' class='btn'"); + if(common::hasPriv('api', 'delete')) echo html::a($this->createLink('api', 'deleteStruct', "libID=$libID&structID=$struct->id"), '', 'hiddenwin', "title='{$lang->api->delete}' class='btn'"); ?>