[Bug] - SimplePlugin - Foreign Key attribute value is never found within a SetAttribute definition.
[Bug] - SimplePlugin - Foreign Key attribute value is never found within a SetAttribute definition.
Description
An attribute declared within a SetAttribute such as:
new SetAttribute(
new MailAttribute(
_('Alternative addresses'), _('List of alternative mail addresses'),
'gosaMailAlternateAddress'
)
),
is never found if referenced via a plForeignKey due to simplePlugin->BrosweForeignKey method which wait for a positive boolean return from ForeignKeyCheck.
ForeignKeyCheck is using AttributeAccess with field and values to verify the content and return TRUE if matched. In case of a SetAttribute sub attribute element, the passed value to the AttributeAccess is an array and not a string.
Distribution Name and Version
Debian 11
FusionDirectory Version
1.4-dev
PHP version used
7.4.30
Origin of php packages
From distribution
Steps to Reproduce
A problem was found trying to reference a mail alias with a user DN from accountMail object. Referencing following aliases attributes:
| gosaMailAlternateAddress
| gosaMailForwardingAddress
Would never match the values configured in ForeignKey for the exact same attributes within accountMail.
Expected behavior:
User Reference Tab showing the proper reference links.
Actual behavior:
No References links can be seen.
Reproduces how often:
100%
Additional Information
None.