Page 1 of 1

ZProp_Kerberos vs. ZProp_KRB

Posted: 02.07.2022, 19:50
by aehimself
Hello,

Today I got a "Duplicates not found" error when I enumerated the existing properties for a specific protocol; the issue was with the property named 'KRB'.
I checked it back it pointed me to the two properties above, which are described in ZPropertiesEditor.pas as follows:

Code: Select all

ZProp_Kerberos : TZProperty = (
    Name: ConnProps_Kerberos;
    Purpose: cASA_KerberosPurpose;
    ValueType: pvtString; LevelTypes: [pltConnection];
    Values: ''; Default: 'NO'; Alias: ConnProps_KRB;
    Providers: (Count: 1; Items: @cASAProvider);
    Protocols: (Count: 2; Items: @cASAProtocols);
  );
  ZProp_KRB : TZProperty = (
    Name: ConnProps_KRB;
    Purpose: cASA_KerberosPurpose;
    ValueType: pvtString; LevelTypes: [pltConnection];
    Values: ''; Default: 'NO'; Alias: ConnProps_Kerberos;
    Providers: (Count: 1; Items: @cASAProvider);
    Protocols: (Count: 2; Items: @cASAProtocols);
  );
Aren't the aliases swapped? Shouldn't it be

Code: Select all

ZProp_Kerberos : TZProperty = (
    Name: ConnProps_Kerberos;
    Purpose: cASA_KerberosPurpose;
    ValueType: pvtString; LevelTypes: [pltConnection];
    Values: ''; Default: 'NO'; Alias: ConnProps_Kerberos;
    Providers: (Count: 1; Items: @cASAProvider);
    Protocols: (Count: 2; Items: @cASAProtocols);
  );
  ZProp_KRB : TZProperty = (
    Name: ConnProps_KRB;
    Purpose: cASA_KerberosPurpose;
    ValueType: pvtString; LevelTypes: [pltConnection];
    Values: ''; Default: 'NO'; Alias: ConnProps_KRB;
    Providers: (Count: 1; Items: @cASAProvider);
    Protocols: (Count: 2; Items: @cASAProtocols);
  );
instead?

I did not create a pull request as the issue is really quick to fix and I'm not sure that I am right in this.

Re: ZProp_Kerberos vs. ZProp_KRB

Posted: 03.07.2022, 11:11
by marsupilami
Hello aehimself :)

I assume the current implementation is correct. ConnProps_Kerberos and ConnProps_KRB are aliases for each other. This is why ConnProps_KRB is listed as an alias for ConnProps_Kerberos (and the other way around for ConnProps_KRB).

I take ZProp_LibLocation as an example. ZProp_LibLocation doesn't have an alias which is why an empty sting is listed there.

Best regards,

Jan