Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
RocketChat
Rocket.Chat
Commits
c58567cd
Unverified
Commit
c58567cd
authored
2 years ago
by
Henrique Guimarães Ribeiro
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Regression: Admin menu apps option not working (#27422)
parent
5ec5b2c6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/meteor/client/views/admin/apps/AppsRoute.tsx
+11
-8
11 additions, 8 deletions
apps/meteor/client/views/admin/apps/AppsRoute.tsx
apps/meteor/client/views/admin/routes.tsx
+0
-7
0 additions, 7 deletions
apps/meteor/client/views/admin/routes.tsx
with
11 additions
and
15 deletions
apps/meteor/client/views/admin/apps/AppsRoute.tsx
+
11
−
8
View file @
c58567cd
...
...
@@ -15,9 +15,19 @@ const AppsRoute = (): ReactElement => {
const
appsWhatIsItRoute
=
useRoute
(
'
admin-apps-disabled
'
);
const
marketplaceRoute
=
useRoute
(
'
admin-marketplace
'
);
const
context
=
useRouteParameter
(
'
context
'
);
const
id
=
useRouteParameter
(
'
id
'
);
const
page
=
useRouteParameter
(
'
page
'
);
const
isMarketplace
=
!
context
;
useEffect
(()
=>
{
let
mounted
=
true
;
if
(
!
context
)
{
marketplaceRoute
.
replace
({
context
:
'
all
'
,
page
:
'
list
'
});
}
const
initialize
=
async
():
Promise
<
void
>
=>
{
if
(
!
canManageApps
)
{
return
;
...
...
@@ -40,14 +50,7 @@ const AppsRoute = (): ReactElement => {
return
():
void
=>
{
mounted
=
false
;
};
},
[
canManageApps
,
isAppsEngineEnabled
,
appsWhatIsItRoute
,
marketplaceRoute
]);
const
context
=
useRouteParameter
(
'
context
'
);
const
isMarketplace
=
!
context
;
const
id
=
useRouteParameter
(
'
id
'
);
const
page
=
useRouteParameter
(
'
page
'
);
},
[
canManageApps
,
isAppsEngineEnabled
,
appsWhatIsItRoute
,
marketplaceRoute
,
context
]);
if
(
!
canManageApps
)
{
return
<
NotAuthorizedPage
/>;
...
...
This diff is collapsed.
Click to expand it.
apps/meteor/client/views/admin/routes.tsx
+
0
−
7
View file @
c58567cd
...
...
@@ -24,13 +24,6 @@ registerAdminRoute('/apps/what-is-it', {
registerAdminRoute
(
'
/marketplace/:context?/:page?/:id?/:version?/:tab?
'
,
{
name
:
'
admin-marketplace
'
,
component
:
lazy
(()
=>
import
(
'
./apps/AppsRoute
'
)),
triggersEnter
:
[
(
context
,
redirect
):
void
=>
{
if
(
!
context
.
params
.
context
)
{
redirect
(
'
/admin/marketplace/all/list
'
);
}
},
],
});
registerAdminRoute
(
'
/info
'
,
{
...
...
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