Ignore:
Timestamp:
6 May 2012, 11:19:38 (13 years ago)
Author:
Henrik Bettermann
Message:

Add more roles and reorganize permissions.

Remove grok.require('waeup.manageUniversity') from grok.Container classes.

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

Legend:

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

    r8366 r8367  
    311311    grok.name('administration')
    312312    grok.context(IUniversity)
    313     grok.require('waeup.manageUniversity')
     313    grok.require('waeup.managePortal')
    314314    label = _(u'Administration')
    315315    pnav = 0
     
    356356    grok.context(IUniversity)
    357357    grok.name('reindex')
    358     grok.require('waeup.manageUniversity')
     358    grok.require('waeup.managePortal')
    359359
    360360    def update(self,ctlg=None):
     
    594594    grok.name('search')
    595595    grok.template('searchpage')
    596     grok.require('waeup.manageUniversity')
     596    grok.require('waeup.viewAcademics')
    597597    label = _(u"Search Academic Section")
    598598    pnav = 1
     
    863863    grok.name('import1')
    864864    grok.template('datacenterimport1page')
    865     grok.require('waeup.manageDataCenter')
     865    grok.require('waeup.importData')
    866866    label = _(u'Process CSV file')
    867867    pnav = 0
     
    893893    grok.name('import2')
    894894    grok.template('datacenterimport2page')
    895     grok.require('waeup.manageDataCenter')
     895    grok.require('waeup.importData')
    896896    label = _(u'Process CSV file')
    897897    pnav = 0
     
    10131013    grok.name('import3')
    10141014    grok.template('datacenterimport3page')
    1015     grok.require('waeup.manageDataCenter')
     1015    grok.require('waeup.importData')
    10161016    label = _(u'Process CSV file')
    10171017    pnav = 0
     
    11211121    grok.name('import4')
    11221122    grok.template('datacenterimport4page')
    1123     grok.require('waeup.manageDataCenter')
     1123    grok.require('waeup.importData')
    11241124    label = _(u'Process CSV file')
    11251125    pnav = 0
     
    11781178    grok.name('logs')
    11791179    grok.template('datacenterlogspage')
    1180     grok.require('waeup.manageUniversity')
     1180    grok.require('waeup.manageDataCenter')
    11811181    label = _(u'Show logfiles')
    11821182    pnav = 0
     
    12001200    grok.name('show')
    12011201    grok.template('datacenterlogsshowfilepage')
    1202     grok.require('waeup.manageUniversity')
     1202    grok.require('waeup.manageDataCenter')
    12031203    title = _(u'Data Center')
    12041204    pnav = 0
     
    12751275    grok.name('export')
    12761276    grok.template('datacenterexportpage')
    1277     grok.require('waeup.manageUniversity')
     1277    grok.require('waeup.manageDataCenter')
    12781278    label = _('Download portal data as CSV file')
    12791279    pnav = 0
     
    13021302    grok.context(IDataCenter)
    13031303    grok.name('export.csv')
    1304     grok.require('waeup.manageUniversity')
     1304    grok.require('waeup.manageDataCenter')
    13051305
    13061306    def render(self, exporter=None):
     
    13181318    """
    13191319    grok.name('export.xml')
    1320     grok.require('waeup.manageUniversity')
     1320    grok.require('waeup.managePortal')
    13211321
    13221322    def render(self):
     
    13351335    """
    13361336    grok.name('importxml')
    1337     grok.require('waeup.manageUniversity')
     1337    grok.require('waeup.managePortal')
    13381338
    13391339    def update(self, xmlfile=None, CANCEL=None, SUBMIT=None):
     
    13781378    grok.context(IFacultiesContainer)
    13791379    grok.name('manage')
    1380     grok.require('waeup.manageUniversity')
     1380    grok.require('waeup.manageAcademics')
    13811381    grok.template('facultiescontainermanagepage')
    13821382    pnav = 1
     
    14121412    """
    14131413    grok.context(IFacultiesContainer)
    1414     grok.require('waeup.manageUniversity')
     1414    grok.require('waeup.manageAcademics')
    14151415    grok.name('add')
    14161416    label = _('Add faculty')
     
    14531453    grok.context(IFaculty)
    14541454    grok.name('manage')
    1455     grok.require('waeup.manageUniversity')
     1455    grok.require('waeup.manageAcademics')
    14561456    grok.template('facultymanagepage')
    14571457    pnav = 1
     
    15271527    grok.context(IFaculty)
    15281528    grok.name('add')
    1529     grok.require('waeup.manageUniversity')
     1529    grok.require('waeup.manageAcademics')
    15301530    label = _('Add department')
    15311531    form_fields = grok.AutoFields(IDepartmentAdd)
     
    16211621    grok.context(IDepartment)
    16221622    grok.name('manage')
    1623     grok.require('waeup.manageUniversity')
     1623    grok.require('waeup.manageAcademics')
    16241624    pnav = 1
    16251625    grok.template('departmentmanagepage')
     
    17231723    grok.context(IDepartment)
    17241724    grok.name('addcourse')
    1725     grok.require('waeup.manageUniversity')
     1725    grok.require('waeup.manageAcademics')
    17261726    label = _(u'Add course')
    17271727    form_fields = grok.AutoFields(ICourseAdd)
     
    17601760    grok.context(IDepartment)
    17611761    grok.name('addcertificate')
    1762     grok.require('waeup.manageUniversity')
     1762    grok.require('waeup.manageAcademics')
    17631763    label = _(u'Add certificate')
    17641764    form_fields = grok.AutoFields(ICertificateAdd)
     
    18141814    grok.context(ICourse)
    18151815    grok.name('manage')
    1816     grok.require('waeup.manageUniversity')
     1816    grok.require('waeup.manageAcademics')
    18171817    label = _(u'Edit course')
    18181818    pnav = 1
     
    18631863    grok.context(ICertificate)
    18641864    grok.name('manage')
    1865     grok.require('waeup.manageUniversity')
     1865    grok.require('waeup.manageAcademics')
    18661866    pnav = 1
    18671867    label = _('Edit certificate')
     
    19411941    grok.context(ICertificate)
    19421942    grok.name('addcertificatecourse')
    1943     grok.require('waeup.manageUniversity')
     1943    grok.require('waeup.manageAcademics')
    19441944    form_fields = grok.AutoFields(ICertificateCourseAdd)
    19451945    pnav = 1
     
    19901990    grok.context(ICertificateCourse)
    19911991    grok.name('manage')
    1992     grok.require('waeup.manageUniversity')
     1992    grok.require('waeup.manageAcademics')
    19931993    form_fields = grok.AutoFields(ICertificateCourse)
    19941994    label = _('Edit course referrer')
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py

    r8197 r8367  
    155155    grok.baseclass()
    156156    grok.order(2)
    157     grok.require('waeup.manageUniversity')
     157    grok.require('waeup.manageAcademics')
    158158    icon = 'actionicon_modify.png'
    159159    target = '@@manage'
     
    165165    grok.baseclass()
    166166    grok.order(4)
    167     grok.require('waeup.manageUniversity')
     167    grok.require('waeup.manageAcademics')
    168168    icon = 'actionicon_add.png'
    169169    target = 'add'
     
    175175    grok.baseclass()
    176176    grok.order(4)
    177     grok.require('waeup.manageUniversity')
     177    grok.require('waeup.manageAcademics')
    178178    icon = 'actionicon_delete.png'
    179179    target = 'remove'
     
    185185    grok.baseclass()
    186186    grok.order(5)
    187     grok.require('waeup.manageUniversity')
     187    grok.require('waeup.manageAcademics')
    188188    icon = 'actionicon_search.png'
    189189    target = 'search'
     
    236236#     #grok.view(Index)
    237237#     grok.order(98)
    238 #     grok.require('waeup.manageUniversity')
     238#     grok.require('waeup.managePortal')
    239239
    240240#class ImportXMLAction(grok.Viewlet):
     
    242242#    #grok.view(Index)
    243243#    grok.order(99)
    244 #    grok.require('waeup.manageUniversity')
     244#    grok.require('waeup.managePortal')
    245245#
    246246#    def update(self):
     
    259259    grok.context(IKofaObject)
    260260    grok.order(5)
    261     grok.require('waeup.manageUniversity')
     261    grok.require('waeup.manageAcademics')
    262262    icon = 'actionicon_modify.png' # File must exist in static/
    263263    title = 'Text of link'
     
    346346    every page the user is allowed to go to, if the user has also the
    347347    permissions set by `grok.require()`. By default only users with
    348     ``waeup.manageUniversity`` permission will see links defined by
     348    ``waeup.manageAcademics`` permission will see links defined by
    349349    this or derivated classes.
    350350    """
     
    523523    grok.template('actionbutton')
    524524    grok.viewletmanager(ActionBar)
    525     grok.require('waeup.manageUniversity')
     525    grok.require('waeup.manageAcademics')
    526526    icon = 'actionicon_manage.png' # File must exist in static/
    527527    target = '@@show' # link to this viewname.
     
    542542    grok.context(IDataCenter)
    543543    grok.view(DatacenterPage)
    544     grok.require('waeup.manageUniversity')
     544    grok.require('waeup.importData')
    545545    grok.order(6)
    546546    icon = 'actionicon_gear.png'
     
    551551    grok.context(IDataCenter)
    552552    grok.view(DatacenterPage)
    553     grok.require('waeup.manageUniversity')
     553    grok.require('waeup.manageDataCenter')
    554554    grok.order(5)
    555555    icon = 'actionicon_up.png'
     
    560560    grok.context(IDataCenter)
    561561    grok.view(DatacenterPage)
    562     grok.require('waeup.manageUniversity')
     562    grok.require('waeup.manageDataCenter')
    563563    grok.order(7)
    564564    icon = 'actionicon_down.png'
     
    657657    grok.order(1)
    658658    grok.viewletmanager(AdministrationTasks)
    659     grok.require('waeup.manageUniversity')
     659    grok.require('waeup.managePortal')
    660660    grok.template('admintask')
    661661
     
    765765    grok.viewletmanager(SubobjectLister)
    766766    grok.context(IFaculty)
    767     grok.require('waeup.manageUniversity')
     767    grok.require('waeup.manageAcademics')
    768768
    769769    def render(self):
Note: See TracChangeset for help on using the changeset viewer.