group-permissions.ts 683 B

1234567891011121314151617181920
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { useAppName } from '#shared/composables/useAppName.ts'
  3. import type { FieldResolverModule } from '#shared/entities/object-attributes/types/resolver.ts'
  4. import FieldResolver from '../FieldResolver.ts'
  5. export class FieldResolverUserGroupPermissions extends FieldResolver {
  6. // NB: The group permissions field is currently supported only in desktop app.
  7. fieldType = useAppName() === 'desktop' ? 'groupPermissions' : 'hidden'
  8. public fieldTypeAttributes() {
  9. return {}
  10. }
  11. }
  12. export default <FieldResolverModule>{
  13. type: 'group_permissions',
  14. resolver: FieldResolverUserGroupPermissions,
  15. }