Skip to content

Commit

Permalink
[feat] Add API token to user settings (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
sijav authored Jul 12, 2024
1 parent 826cc33 commit e38a7ce
Show file tree
Hide file tree
Showing 18 changed files with 449 additions and 9 deletions.
63 changes: 60 additions & 3 deletions src/locales/de-DE/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ msgstr "{0, plural, one {# Woche} other {# Wochen}}"
msgid "{0, plural, one {# Year} other {# Years}}"
msgstr "{0, plural, one {# Jahr} other {# Jahre}}"

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:31
msgid "{0} ago"
msgstr ""

#: src/pages/panel/resource-detail/utils/nodeChange.tsx:68
#: src/pages/panel/resource-detail/utils/nodeChange.tsx:115
msgid "{0} checks failed."
Expand Down Expand Up @@ -432,6 +436,11 @@ msgstr "API-Zugriff"
msgid "API Key"
msgstr "API-Schlüssel"

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:15
#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:20
msgid "API Tokens"
msgstr ""

#: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/getInstructions.tsx:79
#: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/WorkspaceSettingsAccountsSetupCloudAzureSubmitCredentials.tsx:102
msgid "Application (client) ID"
Expand All @@ -449,6 +458,7 @@ msgstr "Möchten Sie die Verbindung zu {name} wirklich trennen?"
msgid "Are you sure you want to remove the {name} account {0}?"
msgstr "Sind Sie sicher, dass Sie das {name}-Konto {0} entfernen möchten?"

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:52
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:454
#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:85
#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:107
Expand Down Expand Up @@ -541,6 +551,7 @@ msgstr ""
msgid "Business"
msgstr "Business"

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:59
#: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:68
#: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:121
#: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:49
Expand Down Expand Up @@ -659,6 +670,7 @@ msgstr ""
msgid "Client secret"
msgstr ""

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:78
#: src/pages/panel/user-settings/UserSettingsTotpRecoveryCodesModal.tsx:36
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:391
msgid "Close"
Expand Down Expand Up @@ -748,7 +760,7 @@ msgstr "Verbinden Sie Teams"
msgid "Connect your AWS account"
msgstr "Verbinden Sie Ihr AWS-Konto"

#: src/pages/panel/user-settings/UserSettingsPage.tsx:32
#: src/pages/panel/user-settings/UserSettingsPage.tsx:34
msgid "Connected Accounts"
msgstr "Verbundene Konten"

Expand Down Expand Up @@ -781,14 +793,34 @@ msgstr ""
msgid "Core CSPM scanning capabilities"
msgstr "Kern-CSPM-Scanfunktionen"

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:90
msgid "Create"
msgstr ""

#: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/getInstructions.tsx:84
msgid "Create an App secret"
msgstr ""

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:64
msgid "Create new API token"
msgstr ""

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:72
msgid "Create new API Token"
msgstr ""

#: src/pages/panel/workspace-settings-accounts-setup-cloud-gcp/getInstructions.tsx:46
msgid "Create Service Account"
msgstr ""

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:27
msgid "Created"
msgstr ""

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:95
msgid "Created At"
msgstr ""

#: src/pages/panel/resource-detail/ResourceDetailView.tsx:242
msgid "Created Time"
msgstr "Erstellte Zeit"
Expand Down Expand Up @@ -862,6 +894,11 @@ msgstr ""
msgid "Delayed Effect"
msgstr "Verzögerte Wirkung"

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:33
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:40
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:44
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:45
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:86
#: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:79
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:372
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:376
Expand Down Expand Up @@ -896,6 +933,8 @@ msgstr "Bereitstellung für ein einzelnes Konto"
msgid "Deploy to organization"
msgstr "Für die Organisation bereitstellen"

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:24
#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:97
#: src/pages/panel/workspace-settings-external-directory/WorkspaceSettingsExternalDirectoryPage.tsx:24
msgid "Description"
msgstr "Beschreibung"
Expand Down Expand Up @@ -938,6 +977,10 @@ msgstr ""
msgid "Do you want to delete this account?"
msgstr "Möchten Sie dieses Konto löschen?"

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:53
msgid "Do you want to delete this API Token?"
msgstr ""

#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:86
msgid "Do you want to delete this invitation?"
msgstr "Möchten Sie diese Einladung löschen?"
Expand Down Expand Up @@ -1359,6 +1402,11 @@ msgstr "Arten"
msgid "Last login"
msgstr "Letzte Anmeldung"

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:30
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:98
msgid "Last used"
msgstr ""

#: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:105
msgid "Learn more about the associated risk"
msgstr ""
Expand Down Expand Up @@ -1453,6 +1501,7 @@ msgstr "Die meisten nicht konformen Konten"

#: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:177
#: src/pages/panel/resource-detail/ResourceDetailView.tsx:233
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:92
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:496
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:65
#: src/pages/panel/workspace-settings-external-directory/AddExternalDirectory.tsx:42
Expand Down Expand Up @@ -1575,7 +1624,7 @@ msgstr ""
msgid "Nothing to show yet"
msgstr "Noch nichts zu zeigen"

#: src/pages/panel/user-settings/UserSettingsPage.tsx:27
#: src/pages/panel/user-settings/UserSettingsPage.tsx:29
msgid "Notification"
msgstr "Benachrichtigung"

Expand Down Expand Up @@ -1746,6 +1795,10 @@ msgstr "Wählen Sie eine der Empfehlungen rechts aus und verbessern Sie Ihre Sic
msgid "Please add a payment method to switch your workspace's product tier"
msgstr ""

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:105
msgid "Please enter a brief description"
msgstr ""

#: src/pages/auth/login/LoginPage.tsx:184
msgid "Please enter your One-Time-Password or one of your Recovery code."
msgstr "Bitte geben Sie Ihr One-Time-Passwort oder einen Ihrer Wiederherstellungscodes ein."
Expand Down Expand Up @@ -2161,6 +2214,10 @@ msgstr "Das von Ihnen gesendete Token ist ungültig oder abgelaufen. Bitte versu
msgid "The workspace you requested cannot be accessed. Please request access from the workspace administrator."
msgstr ""

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:104
msgid "There's already another api tokens with the same description"
msgstr ""

#: src/shared/layouts/panel-layout/AccountCheckGuard.tsx:48
msgid "There's no account configured for this workspace."
msgstr "Für diesen Arbeitsbereich ist kein Konto konfiguriert."
Expand Down Expand Up @@ -2303,7 +2360,7 @@ msgstr ""
msgid "User Impersonation permission"
msgstr ""

#: src/pages/panel/user-settings/UserSettingsPage.tsx:16
#: src/pages/panel/user-settings/UserSettingsPage.tsx:18
#: src/shared/layouts/panel-layout/UserProfileButton.tsx:157
msgid "User Settings"
msgstr "Benutzereinstellungen"
Expand Down
63 changes: 60 additions & 3 deletions src/locales/en-US/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ msgstr "{0, plural, one {# Week} other {# Weeks}}"
msgid "{0, plural, one {# Year} other {# Years}}"
msgstr "{0, plural, one {# Year} other {# Years}}"

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:31
msgid "{0} ago"
msgstr "{0} ago"

#: src/pages/panel/resource-detail/utils/nodeChange.tsx:68
#: src/pages/panel/resource-detail/utils/nodeChange.tsx:115
msgid "{0} checks failed."
Expand Down Expand Up @@ -432,6 +436,11 @@ msgstr "API access"
msgid "API Key"
msgstr "API Key"

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:15
#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:20
msgid "API Tokens"
msgstr "API Tokens"

#: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/getInstructions.tsx:79
#: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/WorkspaceSettingsAccountsSetupCloudAzureSubmitCredentials.tsx:102
msgid "Application (client) ID"
Expand All @@ -449,6 +458,7 @@ msgstr "Are you sure you want to disconnect {name}?"
msgid "Are you sure you want to remove the {name} account {0}?"
msgstr "Are you sure you want to remove the {name} account {0}?"

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:52
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:454
#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:85
#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx:107
Expand Down Expand Up @@ -541,6 +551,7 @@ msgstr "Billing history"
msgid "Business"
msgstr "Business"

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:59
#: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:68
#: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:121
#: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:49
Expand Down Expand Up @@ -659,6 +670,7 @@ msgstr "Click the service Account, go to the \"Keys\" Tab, and Click \"Add Key\"
msgid "Client secret"
msgstr "Client secret"

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:78
#: src/pages/panel/user-settings/UserSettingsTotpRecoveryCodesModal.tsx:36
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:391
msgid "Close"
Expand Down Expand Up @@ -748,7 +760,7 @@ msgstr "Connect Teams"
msgid "Connect your AWS account"
msgstr "Connect your AWS account"

#: src/pages/panel/user-settings/UserSettingsPage.tsx:32
#: src/pages/panel/user-settings/UserSettingsPage.tsx:34
msgid "Connected Accounts"
msgstr "Connected Accounts"

Expand Down Expand Up @@ -781,14 +793,34 @@ msgstr "Copy the Secret Value of the created secret and paste it in the Secret V
msgid "Core CSPM scanning capabilities"
msgstr "Core CSPM scanning capabilities"

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:90
msgid "Create"
msgstr "Create"

#: src/pages/panel/workspace-settings-accounts-setup-cloud-azure/getInstructions.tsx:84
msgid "Create an App secret"
msgstr "Create an App secret"

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:64
msgid "Create new API token"
msgstr "Create new API token"

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:72
msgid "Create new API Token"
msgstr "Create new API Token"

#: src/pages/panel/workspace-settings-accounts-setup-cloud-gcp/getInstructions.tsx:46
msgid "Create Service Account"
msgstr "Create Service Account"

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:27
msgid "Created"
msgstr "Created"

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:95
msgid "Created At"
msgstr "Created At"

#: src/pages/panel/resource-detail/ResourceDetailView.tsx:242
msgid "Created Time"
msgstr "Created Time"
Expand Down Expand Up @@ -862,6 +894,11 @@ msgstr "Define Roles"
msgid "Delayed Effect"
msgstr "Delayed Effect"

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:33
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:40
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:44
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:45
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:86
#: src/pages/panel/user-settings/UserSettingsSocialNetworkDeleteButton.tsx:79
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:372
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:376
Expand Down Expand Up @@ -896,6 +933,8 @@ msgstr "Deploy to a single account"
msgid "Deploy to organization"
msgstr "Deploy to organization"

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:24
#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:97
#: src/pages/panel/workspace-settings-external-directory/WorkspaceSettingsExternalDirectoryPage.tsx:24
msgid "Description"
msgstr "Description"
Expand Down Expand Up @@ -938,6 +977,10 @@ msgstr "Do not show this message again."
msgid "Do you want to delete this account?"
msgstr "Do you want to delete this account?"

#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:53
msgid "Do you want to delete this API Token?"
msgstr "Do you want to delete this API Token?"

#: src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx:86
msgid "Do you want to delete this invitation?"
msgstr "Do you want to delete this invitation?"
Expand Down Expand Up @@ -1359,6 +1402,11 @@ msgstr "Kinds"
msgid "Last login"
msgstr "Last login"

#: src/pages/panel/user-settings/UserSettingsApiTokens.tsx:30
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:98
msgid "Last used"
msgstr "Last used"

#: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:105
msgid "Learn more about the associated risk"
msgstr "Learn more about the associated risk"
Expand Down Expand Up @@ -1453,6 +1501,7 @@ msgstr "Most Non-Compliant Accounts"

#: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:177
#: src/pages/panel/resource-detail/ResourceDetailView.tsx:233
#: src/pages/panel/user-settings/UserSettingsApiTokensRow.tsx:92
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:496
#: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountsTableItem.tsx:65
#: src/pages/panel/workspace-settings-external-directory/AddExternalDirectory.tsx:42
Expand Down Expand Up @@ -1575,7 +1624,7 @@ msgstr "Nothing"
msgid "Nothing to show yet"
msgstr "Nothing to show yet"

#: src/pages/panel/user-settings/UserSettingsPage.tsx:27
#: src/pages/panel/user-settings/UserSettingsPage.tsx:29
msgid "Notification"
msgstr "Notification"

Expand Down Expand Up @@ -1746,6 +1795,10 @@ msgstr "Pick one of the recommendations to the right and improve your security"
msgid "Please add a payment method to switch your workspace's product tier"
msgstr "Please add a payment method to switch your workspace's product tier"

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:105
msgid "Please enter a brief description"
msgstr "Please enter a brief description"

#: src/pages/auth/login/LoginPage.tsx:184
msgid "Please enter your One-Time-Password or one of your Recovery code."
msgstr "Please enter your One-Time-Password or one of your Recovery code."
Expand Down Expand Up @@ -2161,6 +2214,10 @@ msgstr "The token that you sent is invalid or have been expired please try again
msgid "The workspace you requested cannot be accessed. Please request access from the workspace administrator."
msgstr "The workspace you requested cannot be accessed. Please request access from the workspace administrator."

#: src/pages/panel/user-settings/UserSettingsApiTokensAddToken.tsx:104
msgid "There's already another api tokens with the same description"
msgstr "There's already another api tokens with the same description"

#: src/shared/layouts/panel-layout/AccountCheckGuard.tsx:48
msgid "There's no account configured for this workspace."
msgstr "There's no account configured for this workspace."
Expand Down Expand Up @@ -2303,7 +2360,7 @@ msgstr "Uploading your Google Cloud Service Account file..."
msgid "User Impersonation permission"
msgstr "User Impersonation permission"

#: src/pages/panel/user-settings/UserSettingsPage.tsx:16
#: src/pages/panel/user-settings/UserSettingsPage.tsx:18
#: src/shared/layouts/panel-layout/UserProfileButton.tsx:157
msgid "User Settings"
msgstr "User Settings"
Expand Down
Loading

0 comments on commit e38a7ce

Please sign in to comment.