Changeset 16134


Ignore:
Timestamp:
28 Jun 2020, 18:01:52 (4 years ago)
Author:
Henrik Bettermann
Message:

Ease customization.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/container.py

    r16133 r16134  
    6262    @property
    6363    def picture_editable(self):
    64         # not used in base package
    65         return self.with_picture
     64        try:
     65            return getUtility(IApplicantsUtils).isPictureEditable(self)
     66        except ComponentLookupError:  # happens in unit tests
     67            return
    6668
    6769    def addApplicant(self, applicant):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r16133 r16134  
    166166        """
    167167
     168    def isPictureEditable(container):
     169        """False if applicants are not allowed to edit uploaded pictures.
     170        """
     171
    168172class IApplicantsRoot(IKofaObject, IContainer):
    169173    """A container for applicants containers.
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py

    r16059 r16134  
    120120        """
    121121        return "%s - %s" % (value.code, value.title)
     122
     123    def isPictureEditable(self, container):
     124        """False if applicants are not allowed to edit uploaded pictures.
     125        """
     126        return container.with_picture
Note: See TracChangeset for help on using the changeset viewer.