fix: enables VIDIS login for school admins - #123
Conversation
| @@ -27,7 +27,7 @@ local buildUsername = function() | |||
| local checkIfIsTeacher = function() | |||
There was a problem hiding this comment.
You could change the function name for a more descriptive one, like checkIsNotStudent or allowedToRegister. (Be sure to change all occurrences)
| local rawClaims = extractFromClaims('raw_claims'); | ||
|
|
||
| if 'rolle' in rawClaims then rawClaims.rolle == 'LEHR' else false; | ||
| if 'rolle' in rawClaims then rawClaims.rolle == 'LEHR' || rawClaims.rolle == 'LEIT' || rawClaims.rolle == 'TRAE' else false; |
There was a problem hiding this comment.
The reason why students can't register is due to youtube/google. As expressed in the meetings with VIDIS: if the teacher uses one of these services in one of the their material and the students can't really choose to opt out (since the teacher is practically compelling them to use), the students shouldn't be allowed to login to serlo.
As you see, it would be easier to invert the logic: if user == 'LERN' ...
But that would be just for a cleaner code.
There was a problem hiding this comment.
Thank you for the explanation, I did not know. I will notify Chancenwerk about the change.
Before: VIDIS login fails for school admins (rolle: 'LEIT')
I think this is the only necessary change. But not 100% sure and did not test it.
@hugotiburtino @kulla Maybe you can have a quick look? But feel free to ignore and let me know if we should forward it to somebody else.☺️