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
Files:
6 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')
  • main/waeup.kofa/trunk/src/waeup/kofa/doctests/permissions.txt

    r14602 r14948  
    3939    >>> from waeup.kofa.permissions import get_waeup_roles
    4040    >>> len(list(get_waeup_roles()))
    41     27
     41    28
    4242
    4343    >>> len(list(get_waeup_roles(also_local=True)))
    44     48
     44    49
    4545
    4646
     
    7474     u'waeup.StudentsClearanceOfficer',
    7575     u'waeup.StudentsCourseAdviser',
     76     u'waeup.StudentsCreator',
    7677     u'waeup.StudentsManager',
    7778     u'waeup.StudentsOfficer',
  • main/waeup.kofa/trunk/src/waeup/kofa/permissions.py

    r14734 r14948  
    566566                     'waeup.clearStudentFinancially',  # not used in base pkg
    567567                     'waeup.uploadStudentFile', 'waeup.showStudents',
    568                      'waeup.clearAllStudents',
     568                     'waeup.clearAllStudents', 'waeup.createStudents',
    569569                     'waeup.editScores',
    570570                     'waeup.triggerTransition',
     
    614614        'waeup.clearStudent', 'waeup.payStudent',
    615615        'waeup.uploadStudentFile', 'waeup.showStudents',
    616         'waeup.clearAllStudents',
     616        'waeup.clearAllStudents', 'waeup.createStudents',
    617617        'waeup.editScores',
    618618        # 'waeup.triggerTransition',
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_helpers.py

    r14939 r14948  
    533533            'some text that \n'
    534534            '\n'      # this empty line will break
    535             'is not a csv file \n' + chr(0x92) + '\n'
     535            'is not a csv file\n' + chr(0x92) + '\n'
    536536            ).splitlines()
    537537        self.assertEqual(helpers.check_csv_charset(csv), 2)
Note: See TracChangeset for help on using the changeset viewer.