Ignore:
Timestamp:
9 Sep 2018, 10:36:38 (6 years ago)
Author:
Henrik Bettermann
Message:

Add ne permissions and roles.

Location:
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/doctests/permissions.txt

    r14948 r15134  
    3939    >>> from waeup.kofa.permissions import get_waeup_roles
    4040    >>> len(list(get_waeup_roles()))
    41     28
     41    29
    4242
    4343    >>> len(list(get_waeup_roles(also_local=True)))
    44     49
     44    52
    4545
    4646
     
    7878     u'waeup.StudentsOfficer',
    7979     u'waeup.TranscriptOfficer',
     80     u'waeup.TranscriptSignee',
    8081     u'waeup.UsersManager',
    8182     u'waeup.WorkflowManager',
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/permissions.py

    r14992 r15134  
    155155
    156156
    157 class ViewTranscript(grok.Permission):
    158     grok.name('waeup.viewTranscript')
    159 
    160 
    161157class ManagePortalConfiguration(grok.Permission):
    162158    """The ManagePortalConfiguration permission allows to
     
    392388                     'waeup.viewAcademics',
    393389                     'waeup.exportData')
     390
     391
     392class LocalTranscriptOfficer(grok.Role):
     393    """The LocalTranscriptOfficer role can be assigned at faculty and
     394    department level. The role allows to view, to validate and to
     395    release student transcripts.
     396    """
     397    grok.name('waeup.local.TranscriptOfficer')
     398    grok.title(u'Transcript Officer')
     399    grok.permissions('waeup.viewAcademics',
     400                     'waeup.viewTranscript',
     401                     'waeup.processTranscript',
     402                     'waeup.viewStudent',
     403                     'waeup.viewStudentsContainer',
     404                     )
     405
     406
     407class LocalTranscriptSignee(grok.Role):
     408    """The LocalTranscriptSignee role can be assigned at faculty and
     409    department level. The role allows to view and to sign student transcripts.
     410    """
     411    grok.name('waeup.local.TranscriptSignee')
     412    grok.title(u'Transcript Signee')
     413    grok.permissions('waeup.viewAcademics',
     414                     'waeup.viewTranscript',
     415                     'waeup.signTranscript',
     416                     'waeup.viewStudent',
     417                     'waeup.viewStudentsContainer',
     418                     )
    394419
    395420
     
    552577                     'waeup.exportData',
    553578                     'waeup.viewTranscript',
     579                     'waeup.processTranscript',
    554580                     'waeup.viewDocuments', 'waeup.manageDocuments',
    555581                     'waeup.managePortalConfiguration',
     
    603629        'waeup.exportData',
    604630        'waeup.viewTranscript',
     631        'waeup.processTranscript',
    605632        'waeup.viewDocuments', 'waeup.manageDocuments',
    606633        'waeup.managePortalConfiguration', 'waeup.viewApplication',
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser.py

    r15128 r15134  
    11511151    grok.context(IStudent)
    11521152    grok.name('release_transcript')
    1153     grok.require('waeup.viewTranscript')
     1153    grok.require('waeup.processTranscript')
    11541154    grok.template('transcriptrelease')
    11551155    form_fields = grok.AutoFields(IStudentTranscript)
     
    11991199
    12001200class StudentTranscriptRequestManageFormPage(KofaEditFormPage):
    1201     """ Page to manage transcript data
     1201    """ Page to manage transcript data. There is no link button
     1202    for this page. It's an emergency page.
    12021203    """
    12031204    grok.context(IStudent)
    12041205    grok.name('manage_transcript_request')
    1205     grok.require('waeup.manageStudent')
     1206    grok.require('waeup.processTranscript')
    12061207    form_fields = grok.AutoFields(IStudentTranscript)
    12071208    label = _('Manage transcript request')
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/permissions.py

    r13762 r15134  
    9292    """
    9393    grok.name('waeup.loginAsStudent')
     94
     95class ViewTranscript(grok.Permission):
     96    """The ViewTranscript role is needed to view transcript pages and slips.
     97    """
     98    grok.name('waeup.viewTranscript')
     99
     100class ProcessTranscript(grok.Permission):
     101    grok.name('waeup.processTranscript')
     102    """The ProcessTranscript role is needed to validate and relase transcripts.
     103    """
     104
     105class SignTranscript(grok.Permission):
     106    grok.name('waeup.signTranscript')
     107    """The ViewTranscript role is needed to sign transcripts.
     108    """
    94109
    95110# Local role
     
    142157
    143158class TranscriptOfficer(grok.Role):
     159    """The Transcript Officer is allowed to view, to validate and to
     160    release student transcripts.
     161    """
    144162    grok.name('waeup.TranscriptOfficer')
    145163    grok.title(u'Transcript Officer')
    146164    grok.permissions('waeup.viewAcademics',
    147165                     'waeup.viewTranscript',
     166                     'waeup.processTranscript',
     167                     'waeup.viewStudent',
     168                     'waeup.viewStudentsContainer',
     169                     )
     170
     171class TranscriptSignee(grok.Role):
     172    """The Transcript Signee is allowed to view and to sign student
     173    transcripts.
     174    """
     175    grok.name('waeup.TranscriptSignee')
     176    grok.title(u'Transcript Signee')
     177    grok.permissions('waeup.viewAcademics',
     178                     'waeup.viewTranscript',
     179                     'waeup.signTranscript',
    148180                     'waeup.viewStudent',
    149181                     'waeup.viewStudentsContainer',
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/viewlets.py

    r15128 r15134  
    780780    grok.context(IStudent)
    781781    grok.view(StudentBaseDisplayFormPage)
    782     grok.require('waeup.viewTranscript')
     782    grok.require('waeup.processTranscript')
    783783    text = _('Release transcript')
    784784    target = 'release_transcript'
Note: See TracChangeset for help on using the changeset viewer.