Common:Utils:OAuth: fix scope list for openid

This commit is contained in:
Timofey Boyko 2023-12-05 18:33:15 +03:00
parent 8b9c3af330
commit 20c3d69d42
2 changed files with 7 additions and 3 deletions

View File

@ -62,12 +62,15 @@ const ScopeList = ({ selectedScopes, scopes, t }: IScopeListProps) => {
for (let key in filteredScopes) {
if (filteredScopes[key].isChecked) {
if (filteredScopes[key].checkedType === ScopeType.read) {
if (
filteredScopes[key].checkedType === ScopeType.read ||
filteredScopes[key].checkedType === ScopeType.openid
) {
//@ts-ignore
result.push(filteredScopes[key].read.tKey || "");
result.push(filteredScopes[key].read?.tKey || "");
} else {
//@ts-ignore
result.push(filteredScopes[key].write.tKey || "");
result.push(filteredScopes[key].write?.tKey || "");
}
}
}

View File

@ -1,6 +1,7 @@
export const enum ScopeType {
read = "read",
write = "write",
openid = "openid",
}
export const enum ScopeGroup {