Ignore:
Timestamp:
8 Feb 2018, 06:52:37 (7 years ago)
Author:
Henrik Bettermann
Message:

Add CreateStudents permission and StudentsCreator role.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
3 edited

Legend:

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

    r14934 r14948  
    664664    grok.context(IApplicant)
    665665    grok.name('createstudent')
    666     grok.require('waeup.manageStudent')
     666    grok.require('waeup.createStudents')
    667667
    668668    def update(self):
     
    685685    #grok.context(IApplicantsContainer)
    686686    grok.name('createallstudents')
    687     grok.require('waeup.managePortal')
     687    grok.require('waeup.createStudents')
    688688
    689689    def update(self):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/permissions.py

    r14511 r14948  
    5757    grok.name('waeup.payApplicant')
    5858
     59class CreateStudents(grok.Permission):
     60    """The CreateStudents permission allows to create a bunch student
     61    records from application records.
     62    """
     63    grok.name('waeup.createStudents')
     64
    5965# Local role
    6066
     
    96102    grok.permissions('waeup.manageApplication', 'waeup.viewApplication',
    97103                     'waeup.viewApplicantsTab', 'waeup.payApplicant')
     104
     105class StudentsCreator(grok.Role):
     106    """The Students Creator is allowed to create a bunch of student
     107    records from application records.
     108    """
     109    grok.name('waeup.StudentsCreator')
     110    grok.title(u'Students Creator')
     111    grok.permissions('waeup.viewApplication',
     112                     'waeup.viewApplicantsTab',
     113                     'waeup.createStudents')
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/viewlets.py

    r14935 r14948  
    180180    grok.context(IApplicantsRoot)
    181181    grok.view(ApplicantsRootPage)
    182     grok.require('waeup.managePortal')
     182    grok.require('waeup.createStudents')
    183183    icon = 'actionicon_entrance.png'
    184184    text = _('Create students')
     
    193193    grok.context(IApplicantsContainer)
    194194    grok.view(ApplicantsContainerPage)
    195     grok.require('waeup.managePortal')
     195    grok.require('waeup.createStudents')
    196196    icon = 'actionicon_entrance.png'
    197197    text = _('Create students')
     
    257257    grok.order(4)
    258258    grok.context(IApplicant)
    259     grok.require('waeup.manageApplication')
     259    grok.require('waeup.createStudents')
    260260    icon = 'actionicon_entrance.png'
    261261    text = _('Create student')
Note: See TracChangeset for help on using the changeset viewer.