Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
minerva
frontend
Merge requests
!204
Resolve "[
MIN-320
] opening project without permission"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "[
MIN-320
] opening project without permission"
253-min-320-opening-project-without-permission
into
development
Overview
0
Commits
17
Pipelines
10
Changes
1
Merged
Piotr Gawron
requested to merge
253-min-320-opening-project-without-permission
into
development
10 months ago
Overview
0
Commits
17
Pipelines
10
Changes
1
Expand
Closes
#253 (closed)
0
0
Merge request reports
Viewing commit
29074d4d
Prev
Next
Show latest version
1 file
+
22
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
29074d4d
open page with another map if other map is available
· 29074d4d
Piotr Gawron
authored
10 months ago
src/components/FunctionalArea/Modal/AccessDeniedModal/AccessDeniedModal.component.tsx
+
22
−
1
Options
@@ -36,6 +36,10 @@ export const AccessDeniedModal: React.FC = () => {
window
.
location
.
href
=
`mailto:
${
adminEmail
}
`
;
};
const
openProject
=
(
e
:
React
.
FormEvent
<
HTMLButtonElement
>
):
void
=>
{
window
.
location
.
href
=
`?id=
${
e
.
currentTarget
.
value
}
`
;
};
return
(
<
div
className
=
"w-[400px] border border-t-[#E1E0E6] bg-white p-[24px]"
>
{
isAnonymousLogin
&&
(
@@ -56,7 +60,24 @@ export const AccessDeniedModal: React.FC = () => {
</
div
>
</
div
>
)
}
{
isProjectsAvailable
&&
<
div
>
Switch to another map
</
div
>
}
{
isProjectsAvailable
&&
(
<
div
>
<
div
className
=
"mb-1 mt-5 text-sm"
>
Switch to another map
</
div
>
<
div
className
=
"grid grid-cols-3 gap-2"
>
{
projects
.
map
(
project
=>
(
<
Button
key
=
{
project
.
projectId
}
value
=
{
project
.
projectId
}
variantStyles
=
"ghost"
className
=
"text-center text-gray-500"
onClick
=
{
openProject
}
>
{
project
.
name
}
(
{
project
.
projectId
}
)
</
Button
>
))
}
</
div
>
</
div
>
)
}
{
isAdminEmail
&&
(
<
div
className
=
"mt-1 text-center"
>
<
Button
Loading