Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GÉANT Service Orchestrator GUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator GUI
Commits
8ac7392b
Commit
8ac7392b
authored
1 year ago
by
Mohammad Torkashvand
Browse files
Options
Downloads
Patches
Plain Diff
fix linting issue
parent
e20687f3
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!16
Develop
,
!9
Fix/nat 402 integrate with custom opa
Pipeline
#85271
passed
1 year ago
Stage: trigger_jenkins_build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.env.local.example
+1
-1
1 addition, 1 deletion
.env.local.example
custom/custom_env.js
+1
-1
1 addition, 1 deletion
custom/custom_env.js
src/utils/policy.ts
+3
-2
3 additions, 2 deletions
src/utils/policy.ts
with
5 additions
and
4 deletions
.env.local.example
+
1
−
1
View file @
8ac7392b
...
...
@@ -15,7 +15,7 @@ REACT_APP_OAUTH2_ENABLED=False
REACT_APP_OAUTH2_CLIENT_ID=
REACT_APP_OAUTH2_OPENID_CONNECT_URL=
REACT_APP_OAUTH2_SCOPE=
REACT_APP_OPA_BUNDLE_URL=
"
http://localhost:8080/opa/bundles/policy.wasm
"
REACT_APP_OPA_BUNDLE_URL=http://localhost:8080/opa/bundles/policy.wasm
# Needed because some libs misbehave
GENERATE_SOURCEMAP=false
...
...
This diff is collapsed.
Click to expand it.
custom/custom_env.js
+
1
−
1
View file @
8ac7392b
window
.
__env__
.
REACT_APP_
OPA_BUNDLE_URL
=
"
${REACT_APP_OPA_BUNDLE_URL}
"
;
window
.
__env__
.
OPA_BUNDLE_URL
=
"
${REACT_APP_OPA_BUNDLE_URL}
"
;
This diff is collapsed.
Click to expand it.
src/utils/policy.ts
+
3
−
2
View file @
8ac7392b
...
...
@@ -6,10 +6,11 @@ export async function createPolicyCheck(user?: Partial<Oidc.Profile>) {
return
()
=>
true
;
}
const
opaBundletUrl
=
process
.
env
.
REACT_APP_
OPA_BUNDLE_URL
;
const
opaBundletUrl
=
process
.
env
.
OPA_BUNDLE_URL
;
if
(
typeof
opaBundletUrl
===
'
undefined
'
)
{
throw
new
Error
(
'
REACT_APP_OPA_BUNDLE_URL is not defined
'
);
console
.
log
(
'
OPA_BUNDLE_URL is not defined
'
);
return
()
=>
true
;
}
const
policyResult
=
await
fetch
(
opaBundletUrl
);
...
...
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