Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
0a98662c
Commit
0a98662c
authored
Feb 02, 2021
by
Robert Czechowski
Browse files
Revert "Add workaround for PMS OAuth provider giving inconsistently typed school data"
This reverts commit
311b351f
.
parent
311b351f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/webfw_iron.rs
View file @
0a98662c
...
@@ -1250,15 +1250,6 @@ fn oauth_pms(req: &mut Request, oauth_provider: OauthProvider, school_id: Option
...
@@ -1250,15 +1250,6 @@ fn oauth_pms(req: &mut Request, oauth_provider: OauthProvider, school_id: Option
// Unify ambiguous fields
// Unify ambiguous fields
user_data
.userId
=
user_data
.userID
.or
(
user_data
.userId
);
user_data
.userId
=
user_data
.userID
.or
(
user_data
.userId
);
// Workaround for PMS:
if
user_data
.userType
==
"t"
||
user_data
.userType
==
"T"
{
if
let
Some
(
SchoolIdOrSchoolIds
::
SchoolId
(
school_id
))
=
user_data
.schoolId
{
let
mut
v
=
Vec
::
new
();
v
.push
(
school_id
);
user_data
.schoolId
=
Some
(
SchoolIdOrSchoolIds
::
SchoolIds
(
v
));
}
}
// Does the user has an array of school (i.e. is he a teacher)?
// Does the user has an array of school (i.e. is he a teacher)?
if
let
Some
(
SchoolIdOrSchoolIds
::
SchoolIds
(
school_ids
))
=
user_data
.schoolId
{
if
let
Some
(
SchoolIdOrSchoolIds
::
SchoolIds
(
school_ids
))
=
user_data
.schoolId
{
// Has there been a school selected?
// Has there been a school selected?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment