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
dea45804
Commit
dea45804
authored
1 year ago
by
Mohammad Torkashvand
Browse files
Options
Downloads
Patches
Plain Diff
remove policy check temporary
parent
9137cf63
No related branches found
No related tags found
2 merge requests
!16
Develop
,
!5
remove policy check temporary
Pipeline
#85126
passed
1 year ago
Stage: trigger_jenkins_build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+1
-0
1 addition, 0 deletions
Dockerfile
src/utils/policy.ts
+18
-0
18 additions, 0 deletions
src/utils/policy.ts
with
19 additions
and
0 deletions
Dockerfile
+
1
−
0
View file @
dea45804
...
@@ -24,6 +24,7 @@ COPY custom src/custom
...
@@ -24,6 +24,7 @@ COPY custom src/custom
COPY
logo.svg src/images/logo.svg
COPY
logo.svg src/images/logo.svg
COPY
favicon.ico public/favicon.ico
COPY
favicon.ico public/favicon.ico
COPY
colors.ts src/stylesheets/emotion/colors.ts
COPY
colors.ts src/stylesheets/emotion/colors.ts
COPY
src/utils/policy.ts src/utils/policy.ts
RUN
yarn build
RUN
yarn build
...
...
This diff is collapsed.
Click to expand it.
src/utils/policy.ts
0 → 100644
+
18
−
0
View file @
dea45804
import
{
loadPolicy
}
from
"
@open-policy-agent/opa-wasm
"
;
import
{
ENV
}
from
"
env
"
;
import
{
join
}
from
"
lodash
"
;
export
async
function
createPolicyCheck
(
user
?:
Partial
<
Oidc
.
Profile
>
)
{
if
(
!
user
)
{
return
()
=>
true
;
}
try
{
function
allowed
(
resource
:
string
):
boolean
{
return
true
;
}
return
allowed
;
}
catch
{
console
.
error
(
"
policy evaluation error
"
);
return
(
_
:
string
)
=>
false
;
}
}
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