Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/spotty-crabs-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes an issue that prevents the Enable button from being displayed on some migrated apps
10 changes: 8 additions & 2 deletions apps/meteor/client/views/marketplace/hooks/useAppMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,14 @@ export const useAppMenu = (app: App, isAppDetailsPage: boolean) => {
},
];

const isEnterpriseOrNot = (app.isEnterpriseOnly && isEnterpriseLicense) || !app.isEnterpriseOnly;
const isPossibleToEnableApp = app.installed && isAdminUser && !isAppEnabled && isEnterpriseOrNot;
const isPossibleToEnableApp =
app.installed &&
isAdminUser &&
!isAppEnabled &&
// If the app is migrated, it can be enabled regardless of other validations
// If not, and the app isEnterpriseOnly, we need to check the workspace's license
(app.migrated || !app.isEnterpriseOnly || isEnterpriseLicense);

const doesItReachedTheLimit =
!app.migrated &&
!appCountQuery?.data?.hasUnlimitedApps &&
Expand Down
Loading