Changeset 4627


Ignore:
Timestamp:
2 Jan 2010, 13:49:37 (15 years ago)
Author:
uli
Message:

Add usercontainer mainpage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-layout/src/waeup/browser/pages.py

    r4610 r4627  
    44import grok
    55from waeup.browser import WAeUPPage, WAeUPEditFormPage
    6 from waeup.interfaces import IUniversity, IWAeUPObject
     6from waeup.interfaces import IUniversity, IWAeUPObject, IUserContainer
    77from waeup.widgets.interfaces import ITableProvider
    88from zope.app.security.interfaces import (IAuthentication,
     
    108108        self.redirect(self.url(self.context))
    109109        return
     110
     111#
     112# User container pages...
     113#
     114   
     115class UserContainerPage(WAeUPPage):
     116    grok.require('waeup.manageUsers')
     117    grok.context(IUserContainer)
     118    grok.name('index')
     119    title = 'Users'
     120   
     121    def update(self, userid=None, adduser=None, edit=None, delete=None):
     122        if edit is not None and userid is not None:
     123            self.redirect(self.url(userid))
     124        if delete is not None and userid is not None:
     125            self.context.delUser(userid)
     126            self.flash('User %s successfully deleted.' % userid)
Note: See TracChangeset for help on using the changeset viewer.