How can I check in the code whether a website has set up and is using PAM or not? Background: I am creating some data in a folder with a cronjob. In a site with PAM there are several folders, depending on how many languages are configured.
thats my snippet, but it doesn't feel so good
def is_multilingual_setup_active(portal):
language_tool = getToolByName(portal, "portal_languages")
languages = language_tool.getSupportedLanguages()
is_pam_active = False
for language in languages:
if language in portal.keys():
folder = portal[language]
is_pam_active = folder.portal_type == "LRF"
return is_pam_active
is there a interface on every content object if PAM is active or not?
Pseudo Code:
def is_multilingual_setup_active(object):
if PAM_Interface_Marker.providedBy(obj):
# the object is in a LRF Folder
....
else:
# the object is in a portal without active pam support