def condition_txtEditors(self): """ Only show the txtEditors if no gcUsers """ if is_gcommons_Users_installed(self): return False else: return True
def condition_refEditors(self): """ This checks whether to show the refEditors """ if is_gcommons_Users_installed(self): return True else: return False
def condition_unregistered(self): """ This checks whether to show the unregisteredAuthors If gcommons.Users is NOT installed, then this is the only option available, if gcommons.Users is installed, then hide this option if config.enforceRegistration is true """ config = self.aq_getConfig() if config.getParameter('force-registration', True) and is_gcommons_Users_installed(self) : return False else: return True
def condition_registered(self): """ Only show the Referenced relators field if gcommons.Users installed If gcommons.Users is installed, then show this field. """ config = self.aq_getConfig() if config.getParameter('force-registration', True) and is_gcommons_Users_installed(self): logger.debug("condition_registered True") return True else: logger.debug("condition_registered False") return False
def condition_unregistered(self): """ This checks whether to show the unregisteredAuthors If gcommons.Users is NOT installed, then this is the only option available, if gcommons.Users is installed, then hide this option if config.enforceRegistration is true """ config = self.aq_getConfig() if config.getParameter('force-registration', True) and is_gcommons_Users_installed(self): return False else: return True