Ignore:
Timestamp:
3 Apr 2015, 17:45:48 (10 years ago)
Author:
Henrik Bettermann
Message:

Update security documentation.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/permissions.py

    r12843 r12847  
    2424
    2525class HandleStudent(grok.Permission):
     26    """
     27    The HandleStudent permission is reserved for students.
     28    Students 'handle' their data. Officers 'manage' the data.
     29    """
    2630    grok.name('waeup.handleStudent')
    2731
    2832class ViewStudent(grok.Permission):
     33    """
     34    The ViewStudent permission allows to view all student data.
     35    """
    2936    grok.name('waeup.viewStudent')
    3037
     
    3340
    3441class ViewStudentsContainer(grok.Permission):
     42    """The ViewStudentsContainer permission allows to view the students root
     43    container page.
     44    """
    3545    grok.name('waeup.viewStudentsContainer')
    3646
    3747class PayStudent(grok.Permission):
     48    """The PayStudent permission allows to add an online payment ticket and to
     49    manage tickets.
     50    """
    3851    grok.name('waeup.payStudent')
    3952
    4053class HandleAccommodation(grok.Permission):
     54    """The HandleAccommodation allows to manage bed tickets.
     55    """
    4156    grok.name('waeup.handleAccommodation')
    4257
    4358class UploadStudentFile(grok.Permission):
     59    """The UploadStudentFile permissions allows to upload the passport picture.
     60    The respective page additionally checks the state of the student.
     61    """
    4462    grok.name('waeup.uploadStudentFile')
    4563
    4664class ManageStudent(grok.Permission):
     65    """The ManageStudent permission allows to edit the data.
     66    This permission is meant for clearance officers.
     67    """
    4768    grok.name('waeup.manageStudent')
    4869
    4970class ClearStudent(grok.Permission):
     71    """The ClearStudent permission is needed to clear students
     72    or to reject clearance. This permission is meant for course advisers.
     73    """
    5074    grok.name('waeup.clearStudent')
    5175
    5276class ValidateStudent(grok.Permission):
     77    """The ValidateStudent permission is needed to validate or reject
     78    course lists. This permission is not needed if users
     79    already have the TriggerTransition permission.
     80    """
    5381    grok.name('waeup.validateStudent')
    5482
    5583class EditStudyLevel(grok.Permission):
     84    """The EditStudyLevel permission is needed for editing course lists.
     85    Students and course advisers do have this permission.
     86    """
    5687    grok.name('waeup.editStudyLevel')
    5788
    5889class LoginAsStudent(grok.Permission):
     90    """The LoginAsStudent is needed to set temporary student passwords
     91    and login as (impersonate) students.
     92    """
    5993    grok.name('waeup.loginAsStudent')
    6094
    6195# Local role
    6296class StudentRecordOwner(grok.Role):
     97    """A student 'owns' her/his student object and subobjects and
     98    gains permissions to handle all data, upload a passport picture,
     99    add payment tickets, create and edit course lists and handle accommodation.
     100    """
    63101    grok.name('waeup.local.StudentRecordOwner')
    64102    grok.title(u'Student Record Owner')
     
    72110# Site Roles
    73111class StudentRole(grok.Role):
     112    """This role is dedicated to students only.
     113    It defines the permissions a student gains portal-wide.
     114    """
    74115    grok.name('waeup.Student')
    75116    grok.title(u'Student (do not assign)')
     
    79120
    80121class StudentsOfficer(grok.Role):
     122    """The Students Officer is allowed to view all student data.
     123    """
    81124    grok.name('waeup.StudentsOfficer')
    82125    grok.title(u'Students Officer (view only)')
     
    85128
    86129class StudentsManager(grok.Role):
     130    """The Students Officer is allowed to edit all student data, to
     131    create payment tickets, to handle bed tickets and to upload passport
     132    pictures.
     133    """
    87134    grok.name('waeup.StudentsManager')
    88135    grok.title(u'Students Manager')
     
    104151
    105152class StudentsClearanceOfficer(grok.Role):
     153    """The global StudentsClearanceOfficer role enables users to view all
     154    student data, to clear students and to reject clearance portal-wide.
     155    Usually, this role is not assigned manually.
     156    We are using the correspondent local role instead which assigns the
     157    StudentsClearanceOfficer role dynamically.
     158    """
    106159    grok.name('waeup.StudentsClearanceOfficer')
    107160    grok.title(u'Clearance Officer (all students)')
     
    110163
    111164class StudentsCourseAdviser(grok.Role):
     165    """The global StudentsCourseAdviser role enables users to view all
     166    student data, to edit, validate or reject course lists  portal-wide.
     167    Usually, this role is not assigned manually.
     168    We are using the correspondent local role instead which assigns the
     169    StudentsCourseAdviser role dynamically.
     170    """
    112171    grok.name('waeup.StudentsCourseAdviser')
    113172    grok.title(u'Course Adviser (all students)')
     
    117176
    118177class StudentImpersonator(grok.Role):
     178    """The Student Impersonator gains the LoginAsStudent permission,
     179    nothing else, see description above.
     180    """
    119181    grok.name('waeup.StudentImpersonator')
    120182    grok.title(u'Student Impersonator')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r12632 r12847  
    688688        self.assertEqual(self.browser.headers['Content-Type'],
    689689                         'application/pdf')
     690        # We want to see the signature fields.
     691        IWorkflowState(self.student).setState('cleared')
     692        self.browser.open(self.student_path + '/clearance_slip.pdf')
     693        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     694        self.assertEqual(self.browser.headers['Content-Type'],
     695                         'application/pdf')
     696        path = os.path.join(samples_dir(), 'clearance_slip.pdf')
     697        open(path, 'wb').write(self.browser.contents)
     698        print "Sample PDF clearance_slip.pdf written to %s" % path
    690699
    691700    def test_manage_course_lists(self):
Note: See TracChangeset for help on using the changeset viewer.