tokenAccess.ts 889 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { useCheckTokenAccess } from '../../../composables/permission/useCheckTokenAccess.ts'
  3. import type { PersonalSettingPlugin } from './types.ts'
  4. export default <PersonalSettingPlugin>{
  5. label: __('Token Access'),
  6. category: {
  7. label: __('Security'),
  8. id: 'category-security',
  9. order: 9000,
  10. },
  11. route: {
  12. path: 'token-access',
  13. name: 'PersonalSettingTokenAccess',
  14. component: () => import('../../PersonalSettingTokenAccess.vue'),
  15. level: 2,
  16. meta: {
  17. title: __('Token Access'),
  18. requiresAuth: true,
  19. requiredPermission: 'user_preferences.access_token',
  20. },
  21. },
  22. order: 4000,
  23. keywords: __('token access,token,api,access token,application'),
  24. show: () => {
  25. const { canUseAccessToken } = useCheckTokenAccess()
  26. return canUseAccessToken.value
  27. },
  28. }