Commit 47494564 authored by Thomas Löffler's avatar Thomas Löffler

Add possibility for Security Team members to upload any extension

parent 2d891434
Pipeline #2847 passed with stages
in 4 minutes and 8 seconds
......@@ -157,14 +157,29 @@ class tx_ter_helper
throw new \T3o\Ter\Exception\UnauthorizedException('The specified user does not exist. You need to login first on extensions.typo3.org.', TX_TER_ERROR_GENERAL_USERNOTFOUND);
}
$row['admin'] = (intval($this->pluginObj->conf['adminFrontendUsergroupUid']) && GeneralUtility::inList(
$row['usergroup'],
$this->pluginObj->conf['adminFrontendUsergroupUid']
));
$row['admin'] = $this->userIsAdmin($row['usergroup']) || $this->userIsSecurityTeamMember($row['usergroup']);
return $row;
}
/**
* @param string $userGroupList
* @return bool
*/
private function userIsAdmin(string $userGroupList): bool
{
return GeneralUtility::inList($userGroupList, $this->pluginObj->conf['adminFrontendUsergroupUid']);
}
/**
* @param string $userGroupList
* @return bool
*/
private function userIsSecurityTeamMember(string $userGroupList): bool
{
return GeneralUtility::inList($userGroupList, $this->pluginObj->conf['securityTeamFrontendUsergroupUid']);
}
/**
* We check whether a user is logged in by TYPO3
* because of a sent session cookie
......
......@@ -2,6 +2,7 @@ plugin.tx_ter_pi1 {
pid =
reviewersFrontendUsergroupUid = 2
adminFrontendUsergroupUid = 3
securityTeamFrontendUsergroupUid = 22
mirrorsFrontendUsergroupUid =
wsdlNamespace =
}
......@@ -2,6 +2,7 @@ plugin.tx_ter_pi1 {
pid = {$plugin.tx_ter_pi1.pid}
reviewersFrontendUsergroupUid = {$plugin.tx_ter_pi1.reviewersFrontendUsergroupUid}
adminFrontendUsergroupUid = {$plugin.tx_ter_pi1.adminFrontendUsergroupUid}
securityTeamFrontendUsergroupUid = {$plugin.tx_ter_pi1.securityTeamFrontendUsergroupUid}
mirrorsFrontendUsergroupUid = {$plugin.tx_ter_pi1.mirrorsFrontendUsergroupUid}
wsdlNamespace = {$plugin.tx_ter_pi1.wsdlNamespace}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment