Skip to content

Commit

Permalink
fix: vidis logic
Browse files Browse the repository at this point in the history
  • Loading branch information
hejtful committed Jul 22, 2024
1 parent 722ca81 commit 508251c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/kratos/vidis_user_mapper.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ local buildUsername = function()
local checkIfIsTeacher = function()
local rawClaims = extractFromClaims('raw_claims');

if 'rolle' in rawClaims then rawClaims['rolle'] == 'LEHR' else false;
if 'rolle' in rawClaims then rawClaims['rolle'] != 'LEHR' else false;

{
identity: if checkIfIsTeacher() then {
if checkIfIsTeacher() then {
identity: {
traits: {
email: buildEmail(),
username: buildUsername(),
interest: 'other',
},
} else error std.format("ERR_BAD_ROLE"),
}
},
} else error "ERR_BAD_ROLE"

0 comments on commit 508251c

Please sign in to comment.