dsv-su / play

Dev repository for Play
0 stars 1 forks source link

Refactor Middleware authorization and tickethandler #93

Closed orkit closed 2 years ago

orkit commented 2 years ago

As a presentation can belong to several courses, there will be some conflicts in the system that must be resolved. Since the course setting takes over the presentation setting, a problem arises if the course administrators set the courses differently - which setting should apply? This affects token management for playback and middleware for user authorization.

pavelsokolov commented 2 years ago

I would say that if a course is set to hidden/not downloadable, then this setting should be propagated to all its presentation no matter what other courses they have.

orkit commented 2 years ago

Yes, thats how its set now but I'm thinking of the playback permissions. If there are different playback permissions in the different courses. If, for example, one course is set to 'Public' and another to 'Staff' etc. I think for now I will set it so that if a presentation belongs to several courses and there are different settings in each course then it should be set to the default setting, 'Students and staff' and then we can discuss this further.

orkit commented 2 years ago

TicketHandler has now been refactored to make it easier to change future logic. For now the course settings take over any individual settings. If a presentation belongs to multiple courses and there are multiple course settings, the presentation setting returns to the default course setting.