Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 6179)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 6184)
@@ -43,5 +43,5 @@
     ThumbnailWidget, EncodingImageFileWidget,
     )
-from waeup.sirp.interfaces import IWAeUPObject
+from waeup.sirp.interfaces import IWAeUPObject, ILocalRolesAssignable
 from waeup.sirp.widgets.datewidget import (
     FriendlyDateWidget, FriendlyDateDisplayWidget)
@@ -58,4 +58,6 @@
     IApplicantsContainerAdd, application_types_vocab
     )
+from waeup.sirp.browser.pages import add_local_role, del_local_roles
+from waeup.sirp.permissions import get_users_with_local_roles, getRoles
 
 results_widget = CustomWidgetFactory(
@@ -99,4 +101,6 @@
     grok.require('waeup.manageUniversity')
     taboneactions = ['Add applicants container', 'Remove selected','Cancel']
+    tabtwoactions1 = ['Remove selected local roles']
+    tabtwoactions2 = ['Add local role']
     subunits = 'Applicants Containers'
 
@@ -105,4 +109,18 @@
         datatable.need()
         return super(ApplicantsRootManageFormPage, self).update()
+
+    def getLocalRoles(self):
+        roles = ILocalRolesAssignable(self.context)
+        return roles()
+
+    def getUsers(self):
+        """Get a list of all users.
+        """
+        for key, val in grok.getSite()['users'].items():
+            url = self.url(val)
+            yield(dict(url=url, name=key, val=val))
+
+    def getUsersWithLocalRoles(self):
+        return get_users_with_local_roles(self.context)
 
     # ToDo: Show warning message before deletion
@@ -136,4 +154,12 @@
         return
 
+    @grok.action('Add local role', validator=NullValidator)
+    def addLocalRole(self, **data):
+        return add_local_role(self,2, **data)
+
+    @grok.action('Remove selected local roles')
+    def delLocalRoles(self, **data):
+        return del_local_roles(self,2,**data)
+
 class ApplicantsContainerAddFormPage(WAeUPAddFormPage):
     grok.context(IApplicantsRoot)
@@ -255,4 +281,6 @@
     taboneactions = ['Save','Cancel']
     tabtwoactions = ['Add applicant', 'Remove selected','Cancel']
+    tabthreeactions1 = ['Remove selected local roles']
+    tabthreeactions2 = ['Add local role']
     # Use friendlier date widget...
     form_fields['startdate'].custom_widget = FriendlyDateWidget('le')
@@ -276,4 +304,18 @@
         return super(ApplicantsContainerManageFormPage, self).update()
 
+    def getLocalRoles(self):
+        roles = ILocalRolesAssignable(self.context)
+        return roles()
+
+    def getUsers(self):
+        """Get a list of all users.
+        """
+        for key, val in grok.getSite()['users'].items():
+            url = self.url(val)
+            yield(dict(url=url, name=key, val=val))
+
+    def getUsersWithLocalRoles(self):
+        return get_users_with_local_roles(self.context)
+
     @grok.action('Save')
     def apply(self, **data):
@@ -295,4 +337,12 @@
         self.redirect(self.url(self.context))
         return
+
+    @grok.action('Add local role', validator=NullValidator)
+    def addLocalRole(self, **data):
+        return add_local_role(self,3, **data)
+
+    @grok.action('Remove selected local roles')
+    def delLocalRoles(self, **data):
+        return del_local_roles(self,3,**data)
 
 
@@ -339,5 +389,5 @@
         # Assign current principal the owner role on created applicant
         # record
-        role_manager = IPrincipalRoleManager(self.context)
+        role_manager = IPrincipalRoleManager(self.context[pin])
         role_manager.assignRoleToPrincipal(
             'waeup.local.ApplicationOwner', self.request.principal.id)
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontainermanagepage.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontainermanagepage.pt	(revision 6179)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontainermanagepage.pt	(revision 6184)
@@ -1,107 +1,165 @@
 <form action="." tal:attributes="action request/URL" method="POST"
       class="edit-form" enctype="multipart/form-data">
-
-  <h2 i18n:translate=""
-    tal:condition="view/label"
-    tal:content="view/label">Label</h2>
-
-  <div class="form-status"
-    tal:define="status view/status"
-    tal:condition="status">
-
-    <div i18n:translate="" tal:content="view/status">
-      Form status summary
+  <h2 i18n:translate="" tal:condition="view/label" tal:content="view/label">Label</h2>
+  <div class="form-status" tal:define="status view/status" tal:condition="status">
+    <div i18n:translate="" tal:content="view/status"> Form status summary
     </div>
-
     <ul class="errors" tal:condition="view/errors">
       <li tal:repeat="error view/error_views">
-         <span tal:replace="structure error">Error Type</span>
+        <span tal:replace="structure error">Error Type
+        </span>
       </li>
     </ul>
   </div>
-
   <div id="tabs">
     <ul>
-      <li><a href="#tab-1"><span>Settings</span></a></li>
-      <li><a href="#tab-2"><span>Applicants</span></a></li>
+      <li>
+      <a href="#tab-1">
+        <span>Settings
+        </span></a>
+      </li>
+      <li>
+      <a href="#tab-2">
+        <span>Applicants
+        </span></a>
+      </li>
+      <li>
+      <a href="#tab-3">
+        <span>Local Roles
+        </span></a>
+      </li>
     </ul>
     <div id="tab-1">
+      <table class="zebra">
+        <tbody>
+          <tal:block repeat="widget view/widgets">
+            <tr>
+              <td class="label" tal:define="hint widget/hint">
+                <label tal:condition="python:hint" tal:attributes="for widget/name">
+                  <span class="required" tal:condition="widget/required" >*
+                  </span>
+                  <span i18n:translate="" tal:content="widget/label">label
+                  </span>:
+                </label>
+                <label tal:condition="python:not hint" tal:attributes="for widget/name">
+                  <span class="required" tal:condition="widget/required" >*
+                  </span>
+                  <span i18n:translate="" tal:content="widget/label">label
+                  </span>:
+                </label> </td>
+              <td class="field">
+                <div class="widget" tal:content="structure widget">
+                  <input type="text" />
+                </div>
+                <div class="error" tal:condition="widget/error">
+                  <span tal:replace="structure widget/error">error
+                  </span>
+                </div> </td>
+            </tr>
+          </tal:block>
+        </tbody>
+      </table>
+      <div id="actionsView">
+        <span class="actionButtons" tal:condition="view/availableActions">
+          <span tal:repeat="action view/actions" tal:omit-tag="">
+            <input tal:condition="python:action.label in view.taboneactions"
+                   tal:replace="structure action/render"/>
+          </span>
+        </span>
+      </div>
+    </div>
+    <div id="tab-2"> <h3>Applicants</h3>
+      <table id="datatable" class="display">
+        <thead>
+          <tr>
+            <th>&nbsp;
+            </th>
+            <th>ID
+            </th>
+            <th>status
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr tal:repeat="appl context/values"> <td>
+              <input type="checkbox" name="val_id" tal:attributes="value appl/__name__" /> </td> <td>
+              <a tal:attributes="href python: view.url(appl)"
+                 tal:content="appl/__name__"> ID </a> </td> <td>
+              <span tal:condition="not: appl/locked">in progress
+              </span>
+              <span tal:condition="appl/locked">submitted
+              </span> </td>
+          </tr>
+        </tbody>
+      </table>
+      <div id="actionsView">
+        <span class="actionButtons" tal:condition="view/availableActions">
+          <span tal:repeat="action view/actions" tal:omit-tag="">
+            <input tal:condition="python:action.label in view.tabtwoactions"
+                   tal:replace="structure action/render"/>
+          </span>
+        </span>
+      </div>
+    </div>
+    <div id="tab-3"> <br />
+        <table class="display dataTableManage">
+            <thead>
+                <tr>
+                    <th>&nbsp;
+                    </th>
+                    <th>User Id
+                    </th>
+                    <th>Name
+                    </th>
+                    <th>Local Role
+                    </th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeB">
+                    <td>
+                        <input type="checkbox" name="role_id" tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" />
+                    </td>
+                    <td tal:content="entry/user_name"> USERNAME
+                    </td>
+                    <td tal:content="entry/user_title"> USERTITLE
+                    </td>
+                    <td tal:content="entry/local_role_title"> LOCAL ROLE
+                    </td>
+                </tr>
+            </tbody>
+        </table> <br /><br />
+        <div class="actionButtons" tal:condition="view/availableActions">
+            <span tal:repeat="action view/actions" tal:omit-tag="">
+                <input tal:condition="python:action.label in view.tabthreeactions1" tal:replace="structure action/render"/>
+            </span>
+        </div> <br /><br />
         <table class="zebra">
-        	<tbody>
-        	  <tal:block repeat="widget view/widgets">
-        	    <tr>
-        	      <td class="label" tal:define="hint widget/hint">
-            		<label tal:condition="python:hint"
-            		       tal:attributes="for widget/name">
-            		  <span class="required" tal:condition="widget/required"
-            			>*</span><span i18n:translate=""
-            			tal:content="widget/label">label</span>:
-            		</label>
-            		<label tal:condition="python:not hint"
-            		       tal:attributes="for widget/name">
-            		  <span class="required" tal:condition="widget/required"
-            			>*</span><span i18n:translate=""
-            			tal:content="widget/label">label</span>:
-            		</label>
-        	      </td>
-        	      <td class="field">
-            		<div class="widget" tal:content="structure widget">
-            		  <input type="text" />
-            		</div>
-            		<div class="error" tal:condition="widget/error">
-            		  <span tal:replace="structure widget/error">error</span>
-            		</div>
-        	      </td>
-        	    </tr>
-        	  </tal:block>
-        	</tbody>
+            <tr>
+                <td>
+                    <select id="user" name="user">
+                        <option tal:repeat="user view/getUsers" tal:attributes="value user/name">
+                        <span tal:replace="user/val/description">USERTITLE
+                        </span>
+                        </option>
+                    </select>
+                </td>
+                <td>
+                    <select id="local_role" name="local_role">
+                        <option tal:repeat="localrole view/getLocalRoles" tal:attributes="value localrole/name">
+                        <span tal:replace="localrole/title">LOCALROLETITLE
+                        </span>
+                        </option>
+                    </select>
+                </td>
+                <td>
+                    <div class="actionButtons" tal:condition="view/availableActions">
+                        <span tal:repeat="action view/actions" tal:omit-tag="">
+                            <input tal:condition="python:action.label in view.tabthreeactions2" tal:replace="structure action/render"/>
+                        </span>
+                    </div>
+                </td>
+            </tr>
         </table>
-        <div id="actionsView">
-            <span class="actionButtons" tal:condition="view/availableActions">
-                <span tal:repeat="action view/actions"
-                      tal:omit-tag="">
-                  <input tal:condition="python:action.label in view.taboneactions"
-                         tal:replace="structure action/render"/>
-                </span>
-            </span>
-        </div>
-    </div>
-    <div id="tab-2">
-      <h3>Applicants</h3>
-      <table id="datatable" class="display">
-    	<thead>
-    	  <tr>
-    	    <th>&nbsp;</th><th>ID</th><th>status</th>
-    	  </tr>
-    	</thead>
-    	<tbody>
-    	  <tr tal:repeat="appl context/values">
-            <td>
-              <input type="checkbox"
-        		 name="val_id"
-        		 tal:attributes="value appl/__name__" />
-            </td>
-    	    <td>
-    	      <a tal:attributes="href python: view.url(appl)"
-    		      tal:content="appl/__name__">
-    		      ID
-    	      </a>
-    	    </td>
-    	    <td>
-    	      <span tal:condition="not: appl/locked">in progress</span>
-    	      <span tal:condition="appl/locked">submitted</span>
-    	    </td>
-    	  </tr>
-    	</tbody>
-    </table>
-    <div id="actionsView">
-        <span class="actionButtons" tal:condition="view/availableActions">
-            <span tal:repeat="action view/actions"
-                  tal:omit-tag="">
-              <input tal:condition="python:action.label in view.tabtwoactions"
-                     tal:replace="structure action/render"/>
-            </span>
-        </span>
-    </div>
     </div>
   </div>
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantsrootmanagepage.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantsrootmanagepage.pt	(revision 6179)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantsrootmanagepage.pt	(revision 6184)
@@ -1,70 +1,124 @@
-<h2 i18n:translate=""
-tal:condition="view/label"
-tal:content="view/label">Label</h2>
-
-<div class="form-status"
-tal:define="status view/status"
-tal:condition="status">
-
-<div i18n:translate="" tal:content="view/status">
-  Form status summary
+<h2 i18n:translate="" tal:condition="view/label" tal:content="view/label">Label</h2>
+<div class="form-status" tal:define="status view/status" tal:condition="status">
+  <div i18n:translate="" tal:content="view/status"> Form status summary
+  </div>
+  <ul class="errors" tal:condition="view/errors">
+    <li tal:repeat="error view/error_views">
+      <span tal:replace="structure error">Error Type
+      </span>
+    </li>
+  </ul>
 </div>
-
-<ul class="errors" tal:condition="view/errors">
-  <li tal:repeat="error view/error_views">
-     <span tal:replace="structure error">Error Type</span>
-  </li>
-</ul>
-</div>
-
-
 <form action="." tal:attributes="action request/URL" method="POST"
-      class="edit-form" enctype="multipart/form-data"> 
-
-<div id="tabs">
-<ul>
-  <li><a href="#tab-1"><span tal:content="view/subunits">Contents</span></a></li>
-</ul>
-   
-<div id="tab-1">
-  <h3 tal:content="view/subunits">Applicants Containers</h3>
-  <table class="display dataTableManage">
-    <thead>
-      <tr>
-        <th>&nbsp;</th><th>Year</th><th>Code</th><th>Title</th>
-      </tr>
-    </thead>
-    <tbody>
-    <tr tal:repeat="entry context/values"
-	class="gradeB">
-     <td>
-      <input type="checkbox"
-		 name="val_id"
-		 tal:attributes="value entry/__name__" />
-     </td>
-      <td tal:content="entry/year">Year
-      </td>
-      <td>
-	<a href=""
-	   tal:attributes="href python:view.url(entry)"
-	   tal:content="entry/__name__">Code</a>
-      </td>
-      <td tal:content="entry/title">Title
-      </td>
-    </tr>
-    </tbody>
-  </table>
-  
-    <div id="actionsView">
+      class="edit-form" enctype="multipart/form-data">
+  <div id="tabs">
+    <ul>
+      <li>
+      <a href="#tab-1">
+        <span tal:content="view/subunits">Contents
+        </span></a>
+      </li>
+      <li>
+      <a href="#tab-2">
+        <span>Local Roles
+        </span></a>
+      </li>
+    </ul>
+    <div id="tab-1">
+      <h3 tal:content="view/subunits">Applicants Containers</h3>
+      <table class="display dataTableManage">
+        <thead>
+          <tr>
+            <th>&nbsp;
+            </th>
+            <th>Year
+            </th>
+            <th>Code
+            </th>
+            <th>Title
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr tal:repeat="entry context/values" 	class="gradeB"> <td>
+              <input type="checkbox" name="val_id"
+                     tal:attributes="value entry/__name__" /> </td>
+            <td tal:content="entry/year">Year </td> <td>
+              <a href="" 	 tal:attributes="href python:view.url(entry)"
+                 tal:content="entry/__name__">Code</a> </td>
+            <td tal:content="entry/title">Title </td>
+          </tr>
+        </tbody>
+      </table>
+      <div id="actionsView">
         <span class="actionButtons" tal:condition="view/availableActions">
-            <span tal:repeat="action view/actions"
-                  tal:omit-tag="">
-              <input tal:condition="python:action.label in view.taboneactions"
-                     tal:replace="structure action/render"/>
+          <span tal:repeat="action view/actions" tal:omit-tag="">
+            <input tal:condition="python:action.label in view.taboneactions"
+                   tal:replace="structure action/render"/>
+          </span>
+        </span>
+      </div>
+    </div>
+    <div id="tab-2"> <br />
+        <table class="display dataTableManage">
+            <thead>
+                <tr>
+                    <th>&nbsp;
+                    </th>
+                    <th>User Id
+                    </th>
+                    <th>Name
+                    </th>
+                    <th>Local Role
+                    </th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeB">
+                    <td>
+                        <input type="checkbox" name="role_id" tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" />
+                    </td>
+                    <td tal:content="entry/user_name"> USERNAME
+                    </td>
+                    <td tal:content="entry/user_title"> USERTITLE
+                    </td>
+                    <td tal:content="entry/local_role_title"> LOCAL ROLE
+                    </td>
+                </tr>
+            </tbody>
+        </table> <br /><br />
+        <div class="actionButtons" tal:condition="view/availableActions">
+            <span tal:repeat="action view/actions" tal:omit-tag="">
+                <input tal:condition="python:action.label in view.tabtwoactions1" tal:replace="structure action/render"/>
             </span>
-        </span>
-    </div>      
-  
-</div>
-</div>
-</form> 
+        </div> <br /><br />
+        <table class="zebra">
+            <tr>
+                <td>
+                    <select id="user" name="user">
+                        <option tal:repeat="user view/getUsers" tal:attributes="value user/name">
+                        <span tal:replace="user/val/description">USERTITLE
+                        </span>
+                        </option>
+                    </select>
+                </td>
+                <td>
+                    <select id="local_role" name="local_role">
+                        <option tal:repeat="localrole view/getLocalRoles" tal:attributes="value localrole/name">
+                        <span tal:replace="localrole/title">LOCALROLETITLE
+                        </span>
+                        </option>
+                    </select>
+                </td>
+                <td>
+                    <div class="actionButtons" tal:condition="view/availableActions">
+                        <span tal:repeat="action view/actions" tal:omit-tag="">
+                            <input tal:condition="python:action.label in view.tabtwoactions2" tal:replace="structure action/render"/>
+                        </span>
+                    </div>
+                </td>
+            </tr>
+        </table>
+    </div>
+  </div>
+</form>
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/container.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/container.py	(revision 6179)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/container.py	(revision 6184)
@@ -50,4 +50,8 @@
     container_description = u'handles basic applicants'
 
+    @property
+    def local_roles(cls):
+        return ['waeup.local.ApplicationsOfficer']
+
     def archive(self, app_ids=None):
         """Create on-dist archive of applicants stored in this term.
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py	(revision 6179)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py	(revision 6184)
@@ -365,4 +365,5 @@
         default = DEFAULT_PASSPORT_IMAGE_MALE,
         required = True,
+        #max_size = 20480,
         )
     aos = schema.TextLine(
@@ -622,4 +623,5 @@
         default = DEFAULT_PASSPORT_IMAGE_MALE,
         required = True ,
+        #max_size = 20480,
         )
     #
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/permissions.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/permissions.py	(revision 6179)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/permissions.py	(revision 6184)
@@ -43,2 +43,7 @@
     grok.title(u'Application Owner')
     grok.permissions('waeup.viewApplication', 'waeup.editApplication')
+
+class ApplicationsOfficer(grok.Role):
+    grok.name('waeup.local.ApplicationsOfficer')
+    grok.title(u'Applications Officer')
+    grok.permissions('waeup.viewFullApplication', 'waeup.editFullApplication')
Index: main/waeup.sirp/trunk/src/waeup/sirp/applicants/root.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/applicants/root.py	(revision 6179)
+++ main/waeup.sirp/trunk/src/waeup/sirp/applicants/root.py	(revision 6184)
@@ -36,4 +36,8 @@
     """
     grok.implements(IApplicantsRoot)
+
+    @property
+    def local_roles(cls):
+        return ['waeup.local.ApplicationsOfficer']
 
 class ApplicantsPlugin(grok.GlobalUtility):
