linkedAccounts.ts 968 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { useThirdPartyAuthentication } from '#shared/composables/authentication/useThirdPartyAuthentication.ts'
  3. import type { PersonalSettingPlugin } from './types.ts'
  4. export default <PersonalSettingPlugin>{
  5. label: __('Linked Accounts'),
  6. category: {
  7. label: __('Security'),
  8. id: 'category-security',
  9. order: 2000,
  10. },
  11. route: {
  12. path: 'linked-accounts',
  13. name: 'PersonalSettingLinkedAccounts',
  14. component: () => import('../../PersonalSettingLinkedAccounts.vue'),
  15. level: 2,
  16. meta: {
  17. title: __('Linked Accounts'),
  18. requiresAuth: true,
  19. requiredPermission: 'user_preferences.linked_accounts',
  20. },
  21. },
  22. order: 5000,
  23. keywords: __(
  24. 'linked accounts,facebook,github,gitlab,google,linkedin,microsoft,saml',
  25. ),
  26. show: () => {
  27. const { hasEnabledProviders } = useThirdPartyAuthentication()
  28. return hasEnabledProviders.value
  29. },
  30. }