Commit e1c73ddd authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_certificate_authority: Include parent reference for backward compatibility

   This code is only required until the slapos.core relies on the certificate text to extract the COMP-* reference.

    This change shouldnt be merged on main branch of erp5 code base, since it is a pure backward compatibility for a single type of user. I dont think we should make it more flexible neither since the need should be gone on the next releases of slapos-node packages.
parent 2f3948a6
...@@ -35,11 +35,11 @@ class CertificateLoginMixin: ...@@ -35,11 +35,11 @@ class CertificateLoginMixin:
def _getCertificate(self): def _getCertificate(self):
portal = self.getPortalObject() portal = self.getPortalObject()
_id = self._generateRandomId() _id = self._generateRandomId()
reference = 'CERTLOGIN-%i-%s' % ( reference = 'CERTLOGIN-%i-%s-%s' % (
portal.portal_ids.generateNewId( portal.portal_ids.generateNewId(
id_group='certificate_login', id_group='certificate_login',
id_generator='non_continuous_integer_increasing', id_generator='non_continuous_integer_increasing',
), _id ), _id, self.getParentValue().getReference("")
) )
self.setReference(reference) self.setReference(reference)
certificate_dict = self.getPortalObject().portal_certificate_authority\ certificate_dict = self.getPortalObject().portal_certificate_authority\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment