aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/permissions/utils.ts
diff options
context:
space:
mode:
authorGuillaume Peoc'h <guillaume.peoch@sonarsource.com>2022-05-24 14:23:09 +0200
committersonartech <sonartech@sonarsource.com>2022-05-24 20:10:14 +0000
commit28852b57ef5d80596d8e98bee00a6e6a0d0c611b (patch)
treed607bb66754f00627bdc6401a0f7f241569014b6 /server/sonar-web/src/main/js/apps/permissions/utils.ts
parentb66ff887e1ad3a81ef438a3832818e61c03eebd7 (diff)
downloadsonarqube-28852b57ef5d80596d8e98bee00a6e6a0d0c611b.tar.gz
sonarqube-28852b57ef5d80596d8e98bee00a6e6a0d0c611b.zip
SONAR-16426 Remove SonarCloud code (frontend)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/permissions/utils.ts')
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/utils.ts14
1 files changed, 3 insertions, 11 deletions
diff --git a/server/sonar-web/src/main/js/apps/permissions/utils.ts b/server/sonar-web/src/main/js/apps/permissions/utils.ts
index 6bd1494c907..2fe4d741417 100644
--- a/server/sonar-web/src/main/js/apps/permissions/utils.ts
+++ b/server/sonar-web/src/main/js/apps/permissions/utils.ts
@@ -17,8 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { hasMessage, translate } from '../../helpers/l10n';
-import { isSonarCloud } from '../../helpers/system';
+import { translate } from '../../helpers/l10n';
import { Dict, PermissionDefinition, PermissionDefinitionGroup } from '../../types/types';
export const PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE = [
@@ -50,15 +49,8 @@ export const PERMISSIONS_ORDER_BY_QUALIFIER: Dict<string[]> = {
};
function convertToPermissionDefinition(permission: string, l10nPrefix: string) {
- const getMessage = (messageKey: string) => {
- const cloudMessageKey = `${messageKey}.sonarcloud`;
- return isSonarCloud() && hasMessage(cloudMessageKey)
- ? translate(cloudMessageKey)
- : translate(messageKey);
- };
-
- const name = getMessage(`${l10nPrefix}.${permission}`);
- const description = getMessage(`${l10nPrefix}.${permission}.desc`);
+ const name = translate(`${l10nPrefix}.${permission}`);
+ const description = translate(`${l10nPrefix}.${permission}.desc`);
return {
key: permission,