* Fix bug #18087,18092.
This commit is contained in:
@@ -1069,7 +1069,7 @@ class gitlab extends control
|
||||
}
|
||||
|
||||
$gitlabTags = $this->gitlab->apiGetTags($gitlabID, $projectID);
|
||||
$protectTags = $this->gitlab->apiGetBranchPrivs($gitlabID, $projectID, '', 'name_asc');
|
||||
$protectTags = $this->gitlab->apiGetTagPrivs($gitlabID, $projectID, '', 'name_asc');
|
||||
$protectNames = array_keys($protectTags);
|
||||
|
||||
$tags = array();
|
||||
|
||||
@@ -2566,11 +2566,13 @@ class gitlabModel extends model
|
||||
{
|
||||
$priv = fixer::input('post')->get();
|
||||
if(empty($priv->name)) dao::$errors['name'][] = $this->lang->gitlab->branch->emptyPrivNameError;
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$singleTag = $this->apiGetSingleTagPriv($gitlabID, $projectID, $priv->name);
|
||||
if(empty($tag) && !empty($singleTag->id)) dao::$errors['name'][] = $this->lang->gitlab->tag->issetPrivNameError;
|
||||
if(dao::isError()) return false;
|
||||
if(!empty($tag) && !empty($singleTag->name)) $this->apiDeleteTagPriv($gitlabID, $projectID, $tag);
|
||||
|
||||
if(!empty($tag) && !empty($singleTag->name)) $this->apiDeleteTagPriv($gitlabID, $projectID, $tag);
|
||||
$response = $this->apiCreateTagPriv($gitlabID, $projectID, $priv);
|
||||
|
||||
if(!empty($response->id))
|
||||
|
||||
Reference in New Issue
Block a user