Release of v3.2.2-alpha3

Fix permission issue for admin views. Add extending options to interfaces.
This commit is contained in:
2024-06-05 16:29:28 +02:00
parent dfaaf15ca9
commit b67e534b9f
43 changed files with 1676 additions and 674 deletions

View File

@@ -57,6 +57,17 @@ class Config extends BaseConfig
$this->config = $config ?: JoomlaFactory::getConfig();
}
/**
* get Gitea Username
*
* @return string the access token
* @since 3.2.0
*/
protected function getGiteausername(): ?string
{
return $this->custom_gitea_username ?? $this->params->get('gitea_username');
}
/**
* get Gitea Access Token
*
@@ -95,6 +106,22 @@ class Config extends BaseConfig
return null;
}
/**
* get Custom Gitea Username
*
* @return string the custom access token
* @since 3.2.0
*/
protected function getCustomgiteausername(): ?string
{
if ($this->add_custom_gitea_url == 2)
{
return $this->params->get('custom_gitea_username');
}
return null;
}
/**
* get Custom Gitea Access Token
*
@@ -148,6 +175,12 @@ class Config extends BaseConfig
$paths = $this->params->get('super_powers_init_repos');
}
// get the users own power repo (can overwrite all)
if (!empty($this->gitea_username))
{
$repos[$this->gitea_username . '.super-powers'] = (object) ['owner' => $this->gitea_username, 'repo' => 'super-powers', 'branch' => 'master'];
}
if (!empty($paths) && is_array($paths))
{
foreach ($paths as $path)
@@ -171,6 +204,22 @@ class Config extends BaseConfig
return $repos;
}
/**
* Get super power push repo
*
* @return object|null The push repository on Gitea
* @since 3.2.1
*/
protected function getSuperpowerspushrepo(): ?object
{
if (!empty($this->gitea_username))
{
return (object) ['owner' => $this->gitea_username, 'repo' => 'super-powers', 'branch' => 'master'];
}
return null;
}
/**
* get temporary path
*