Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 16360)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 16361)
@@ -56,4 +56,5 @@
     NigeriaAccommodationDisplayFormPage,
     NigeriaStudentBaseDisplayFormPage,
+    NigeriaStudentFilesUploadPage,
     )
 
@@ -738,2 +739,21 @@
         'email', 'phone')
     form_fields['email'].field.required = True
+
+class CustomStudentFilesUploadPage(NigeriaStudentFilesUploadPage):
+    """ View to upload passport picture.
+
+    Students are not allowed to change the picture if they
+    passed the regular Kofa application.
+    """
+
+    def update(self):
+        # Passport pictures must not be editable if application slip
+        # exists.
+        slip = getUtility(IExtFileStore).getFileByContext(
+            self.context, 'application_slip')
+        PORTRAIT_CHANGE_STATES = getUtility(IStudentsUtils).PORTRAIT_CHANGE_STATES
+        if self.context.state not in PORTRAIT_CHANGE_STATES or slip is not None:
+            emit_lock_message(self)
+            return
+        super(StudentFilesUploadPage, self).update()
+        return
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 16360)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py	(revision 16361)
@@ -18,9 +18,8 @@
 
 import grok
-from waeup.kofa.interfaces import REQUESTED, REGISTERED
+from zope.component import getUtility
+from waeup.kofa.interfaces import REQUESTED, REGISTERED, IExtFileStore
 from waeup.kofa.browser.viewlets import ManageActionButton
-from waeup.uniben.students.interfaces import (
-    ICustomStudentStudyCourse, ICustomStudentStudyLevel,
-    ICustomStudent, )
+from waeup.kofa.students.interfaces import IStudentsUtils
 from waeup.kofa.students.fileviewlets import (
     StudentFileDisplay, StudentFileUpload, StudentImage,)
@@ -29,5 +28,10 @@
     StudyLevelDisplayFormPage, StudentClearanceDisplayFormPage,
     StudentBaseDisplayFormPage)
-from waeup.kofa.students.viewlets import RequestTranscriptActionButton
+from waeup.kofa.students.viewlets import (
+    RequestTranscriptActionButton, StudentPassportActionButton)
+
+from waeup.uniben.students.interfaces import (
+    ICustomStudentStudyCourse, ICustomStudentStudyLevel,
+    ICustomStudent, )
 
 from kofacustom.nigeria.interfaces import MessageFactory as _
@@ -38,4 +42,17 @@
     def target_url(self):
         return ''
+
+class CustomStudentPassportActionButton(StudentPassportActionButton):
+
+    @property
+    def target_url(self):
+        # Passport pictures must not be editable if application slip
+        # exists.
+        slip = getUtility(IExtFileStore).getFileByContext(
+            self.context, 'application_slip')
+        PORTRAIT_CHANGE_STATES = getUtility(IStudentsUtils).PORTRAIT_CHANGE_STATES
+        if self.context.state not in PORTRAIT_CHANGE_STATES or slip is not None:
+            return ''
+        return self.view.url(self.view.context, self.target)
 
 class SwitchLibraryAccessActionButton(ManageActionButton):
