55
66import { t } from '@nextcloud/l10n'
77
8- import type { EffectivePolicyValue } from '../../../../../types/index'
9- import type { RealPolicySettingDefinition } from '../realTypes'
108import IdentifyMethodsRuleEditor from './IdentifyMethodsRuleEditor.vue'
9+
1110import { normalizeIdentifyMethodsPolicy , serializeIdentifyMethodsPolicy } from './model'
11+ import type { EffectivePolicyValue } from '../../../../../types/index'
12+ import type { RealPolicySettingDefinition } from '../realTypes'
1213
1314export const identifyMethodsRealDefinition : RealPolicySettingDefinition = {
1415 key : 'identify_methods' ,
@@ -17,16 +18,16 @@ export const identifyMethodsRealDefinition: RealPolicySettingDefinition = {
1718 supportedScopes : [ 'system' , 'group' , 'user' ] ,
1819 editor : IdentifyMethodsRuleEditor ,
1920 resolutionMode : 'precedence' ,
20- createEmptyValue : ( ) => [ ] as unknown as EffectivePolicyValue ,
21- normalizeDraftValue : ( value : EffectivePolicyValue ) => serializeIdentifyMethodsPolicy ( normalizeIdentifyMethodsPolicy ( value ) ) as unknown as EffectivePolicyValue ,
21+ createEmptyValue : ( ) => [ ] ,
22+ normalizeDraftValue : ( value : EffectivePolicyValue ) => serializeIdentifyMethodsPolicy ( normalizeIdentifyMethodsPolicy ( value ) ) ,
2223 hasSelectableDraftValue : ( ) => true ,
2324 normalizeAllowChildOverride : ( _scope , allowChildOverride : boolean ) => allowChildOverride ,
2425 getFallbackSystemDefault : ( policyValue : EffectivePolicyValue | null | undefined , sourceScope ?: string | null ) => {
2526 if ( sourceScope === 'system' && policyValue !== null && policyValue !== undefined ) {
2627 return policyValue
2728 }
2829
29- return [ ] as unknown as EffectivePolicyValue
30+ return [ ]
3031 } ,
3132 summarizeValue : ( value : EffectivePolicyValue ) => {
3233 const normalized = normalizeIdentifyMethodsPolicy ( value )
0 commit comments