Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py	(revision 7175)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py	(revision 7176)
@@ -170,30 +170,4 @@
         return 'waeup.Student' in roles
 
-    def getLocalRoles(self, account):
-        """Return HTML tagged string with all local roles of a user account.
-        """
-        local_roles = account.getLocalRoles()
-        local_roles_string = ''
-        site_url = self.url(grok.getSite())
-        for local_role in local_roles.keys():
-            role_title = dict(getRoles())[local_role].title
-            objects_string = ''
-            for object in local_roles[local_role]:
-                objects_string += '<a href="%s">%s</a>, ' %(self.url(object),
-                    self.url(object).replace(site_url,''))
-            local_roles_string += '%s: <br />%s <br />' %(role_title,
-                objects_string.rstrip(', '))
-        return local_roles_string
-
-    def getGlobalRoles(self, account):
-        """Return HTML tagged string with all global roles of a user account.
-        """
-        global_roles = account.roles
-        global_roles_string = ''
-        for global_role in global_roles:
-            role_title = dict(getRoles())[global_role].title
-            global_roles_string += '%s <br />' % role_title
-        return global_roles_string
-
     def update(self):
         """Include the resources required by the chosen skin/theme.
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 7175)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 7176)
@@ -37,5 +37,7 @@
     ISessionConfiguration, ISessionConfigurationAdd, academic_sessions_vocab,
     IPasswordValidator)
-from waeup.sirp.permissions import get_users_with_local_roles
+from waeup.sirp.permissions import (
+    get_users_with_local_roles,
+    getGlobalRolesForAccount, getLocalRolesForAccount)
 from waeup.sirp.university.catalog import search
 from waeup.sirp.university.vocabularies import course_levels
@@ -259,4 +261,10 @@
             self.context.delUser(userid)
             self.flash('User %s successfully deleted.' % userid)
+
+    def getLocalRoles(self, account):
+        return getLocalRolesForAccount(self, account)
+
+    def getGlobalRoles(self, account):
+        return getGlobalRolesForAccount(account)
 
 class AddUserFormPage(WAeUPAddFormPage):
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/userscontainerpage.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/userscontainerpage.pt	(revision 7175)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/userscontainerpage.pt	(revision 7176)
@@ -21,6 +21,6 @@
       <td tal:content="account/title">Title</td>
       <td tal:content="account/description">Description</td>
-      <td tal:content="structure python:layout.getGlobalRoles(account)">Global Roles</td>
-      <td tal:content="structure python:layout.getLocalRoles(account)">Local Roles</td>
+      <td tal:content="structure python:view.getGlobalRoles(account)">Global Roles</td>
+      <td tal:content="structure python:view.getLocalRoles(account)">Local Roles</td>
       <td class="text-right">
         <form method="post">
Index: /main/waeup.sirp/trunk/src/waeup/sirp/permissions.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/permissions.py	(revision 7175)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/permissions.py	(revision 7176)
@@ -4,4 +4,5 @@
 from zope.securitypolicy.interfaces import IRole, IPrincipalRoleMap
 from waeup.sirp.interfaces import ILocalRolesAssignable
+from waeup.sirp.utils.helpers import get_user_account
 
 class Public(grok.Permission):
@@ -118,4 +119,38 @@
     """
     return sorted([x.id for x in getWAeUPRoles()])
+
+def getLocalRolesForAccount(view, account):
+    """Return HTML tagged string with all local roles of a user account.
+    """
+    local_roles = account.getLocalRoles()
+    local_roles_string = ''
+    site_url = view.url(grok.getSite())
+    for local_role in local_roles.keys():
+        role_title = dict(getRoles())[local_role].title
+        objects_string = ''
+        for object in local_roles[local_role]:
+            objects_string += '<a href="%s">%s</a>, ' %(view.url(object),
+                view.url(object).replace(site_url,''))
+        local_roles_string += '%s: <br />%s <br />' %(role_title,
+            objects_string.rstrip(', '))
+    return local_roles_string
+
+def getGlobalRolesForAccount(account):
+    """Return HTML tagged string with all global roles of a user account.
+    """
+    global_roles = account.roles
+    global_roles_string = ''
+    for global_role in global_roles:
+        role_title = dict(getRoles())[global_role].title
+        global_roles_string += '%s <br />' % role_title
+    return global_roles_string
+
+def getMyRoles(view):
+    account = get_user_account(view.request)
+    if account:
+        global_roles = getGlobalRoles(account)
+        local_roles = getLocalRoles(account)
+        return [global_roles,local_roles]
+    return
 
 
