Index: waeup/branches/ulif-rewrite/src/waeup/app.py
===================================================================
--- waeup/branches/ulif-rewrite/src/waeup/app.py	(revision 4073)
+++ waeup/branches/ulif-rewrite/src/waeup/app.py	(revision 4074)
@@ -1,4 +1,6 @@
 import grok
 import re
+from zope.app.authentication.authentication import PluggableAuthentication
+from zope.app.security.interfaces import IAuthentication
 from zope.component import getUtility, getMultiAdapter
 from zope.interface import Interface
@@ -7,4 +9,5 @@
                               IFacultyContainer)
 from waeup.viewlets import MainArea, LeftSidebar, Index, Manage, FormWrapMixin
+from waeup.authentication import setup_authentication
 
 class University(grok.Application, grok.Container):
@@ -12,4 +15,9 @@
     """
     grok.implements(IUniversity)
+    # Setup authentication for this app. Note: this is only
+    # initialized, when a new instance of this app is created.
+    grok.local_utility(
+        PluggableAuthentication, provides = IAuthentication,
+        setup = setup_authentication)
 
     def __init__(self, name=u'Sample University', **kw):
@@ -40,4 +48,5 @@
 
     form_fields = grok.AutoFields(IUniversity)
+    grok.require('waeup.manageUniversity')
 
     @grok.action('Save')
@@ -57,5 +66,13 @@
         return
 
-class ManageUniversity(FormWrapMixin, grok.Viewlet):
+class ManageUniversity(Manage):
+    grok.name('manage')
+    grok.context(IUniversity)
+    grok.require('waeup.manageUniversity')
+
+    def render(self, *args, **kw):
+        return super(ManageUniversity, self).render(*args, **kw)
+    
+class ManageUniversityMain(FormWrapMixin, grok.Viewlet):
     """A viewlet that renders the `ManageForm`.
     """
