Changeset 9494 for main/waeup.kofa/trunk


Ignore:
Timestamp:
31 Oct 2012, 22:11:40 (12 years ago)
Author:
Henrik Bettermann
Message:

Not strip but replace.

Shelter officers from accidental removal of faculties, departments or certicicates.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/browser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt

    r9178 r9494  
    217217  >>> print browser.contents
    218218  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    219   ...<td>Applications Officer <br /></td>
     219  ...<td>Applications Officer</td>
    220220  ...
    221221
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r9493 r9494  
    481481            role_title = dict(get_all_roles())[site_role].title
    482482            site_roles_string += '%s, <br />' % role_title
    483         site_roles_string = site_roles_string.rstrip(', <br />')
     483        site_roles_string = site_roles_string.replace(', <br />','')
    484484        return site_roles_string
    485485
     
    16631663    @jsaction(_('Remove selected'))
    16641664    def delFaculties(self, **data):
     1665        if not checkPermission('waeup.managePortal', self.context):
     1666            self.flash(_('You are not allowed to remove entire faculties.'))
     1667            return
    16651668        delSubobjects(self, redirect='@@manage', tab='1')
    16661669        return
     
    17641767    @jsaction(_('Remove selected'))
    17651768    def delDepartments(self, **data):
     1769        if not checkPermission('waeup.managePortal', self.context):
     1770            self.flash(_('You are not allowed to remove entire departments.'))
     1771            return
    17661772        delSubobjects(self, redirect='@@manage', tab='2')
    17671773        return
     
    19571963    @jsaction(_('Remove selected certificates'))
    19581964    def delCertificates(self, **data):
     1965        if not checkPermission('waeup.managePortal', self.context):
     1966            self.flash(_('You are not allowed to remove certificates.'))
     1967            return
    19591968        delSubobjects(
    19601969            self, redirect='@@manage', tab='3', subcontainer='certificates')
Note: See TracChangeset for help on using the changeset viewer.