Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
m-team
oidc
mytoken
server
Commits
9d350620
Verified
Commit
9d350620
authored
1 year ago
by
Gabriel Zachmann
Browse files
Options
Downloads
Patches
Plain Diff
[web] fix/improve discovery and providers.find not defined
parent
e167758f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
internal/server/web/static/js/discovery.js
+2
-2
2 additions, 2 deletions
internal/server/web/static/js/discovery.js
internal/server/web/static/js/restr-gui.js
+5
-1
5 additions, 1 deletion
internal/server/web/static/js/restr-gui.js
with
9 additions
and
3 deletions
CHANGELOG.md
+
2
−
0
View file @
9d350620
...
...
@@ -28,6 +28,8 @@
-
Webinterface: Improved the title / placeholder for the
`hosts`
restrictions key in the GUI editor to make it more
clear that also subnets can be used.
-
Webinterface: Changed the login provider selector and added search functionality
-
Webinterface: Improved (re-)discovery of mytoken configuration
-
Webinterface: Fixed a problem with scope discovery if there was no OP selected.
-
Profiles: Improved / Fixed includes in especially restrictions when includes involve arrays.
### Bugfixes
...
...
This diff is collapsed.
Click to expand it.
internal/server/web/static/js/discovery.js
+
2
−
2
View file @
9d350620
...
...
@@ -12,7 +12,7 @@ const configElements = [
function
discovery
(...
next
)
{
try
{
const
discovery
=
storageGet
(
'
discovery
'
);
if
(
discovery
!==
null
&&
discovery
!==
undefined
)
{
if
(
discovery
!==
null
&&
discovery
!==
undefined
&&
discovery
>
(
Date
.
now
()
/
1000
-
3600
)
)
{
doNext
(...
next
);
return
;
}
...
...
@@ -23,7 +23,7 @@ function discovery(...next) {
configElements
.
forEach
(
function
(
el
)
{
storageSet
(
el
,
res
[
el
]);
})
storageSet
(
'
discovery
'
,
Date
.
now
())
storageSet
(
'
discovery
'
,
Date
.
now
()
/
1000
)
doNext
(...
next
);
}
});
...
...
This diff is collapsed.
Click to expand it.
internal/server/web/static/js/restr-gui.js
+
5
−
1
View file @
9d350620
...
...
@@ -114,7 +114,11 @@ function getSupportedScopesFromStorage(iss = "") {
iss
=
storageGet
(
"
oidc_issuer
"
);
}
}
return
providers
.
find
(
x
=>
x
.
issuer
===
iss
).
scopes_supported
;
let
p
=
providers
.
find
(
x
=>
x
.
issuer
===
iss
)
if
(
p
===
undefined
)
{
return
[];
}
return
p
.
scopes_supported
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment