Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/license-addons' into test/a…
Browse files Browse the repository at this point in the history
…dd-ons-pre-merge
  • Loading branch information
d-gubert committed Oct 17, 2024
2 parents c77cd45 + 6a407b2 commit f1c8ad8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const MarketplaceHeader = ({ title, unsupportedVersion }: { title: string; unsup
<PageHeader title={title}>
{result.isLoading && <GenericResourceUsageSkeleton mi={16} />}

{result.isSuccess && !result.data.hasUnlimitedApps && (
{!unsupportedVersion && result.isSuccess && !result.data.hasUnlimitedApps && (
<Margins inline={16}>
<EnabledAppsCount
{...result.data}
Expand All @@ -56,10 +56,6 @@ const MarketplaceHeader = ({ title, unsupportedVersion }: { title: string; unsup
)}

<ButtonGroup wrap align='end'>
{!unsupportedVersion && result.isSuccess && !result.data.hasUnlimitedApps && (
<EnabledAppsCount {...result.data} context={context} />
)}

{!unsupportedVersion && isAdmin && result.isSuccess && !result.data.hasUnlimitedApps && context !== 'private' && (
<Button
onClick={() => {
Expand All @@ -71,7 +67,7 @@ const MarketplaceHeader = ({ title, unsupportedVersion }: { title: string; unsup
)}

{isAdmin && context === 'private' && <Button onClick={handleClickPrivate}>{t('Upload_private_app')}</Button>}
{isAdmin && result.isSuccess && !privateAppsEnabled && context === 'private' && <UpdateRocketChatButton />}
{unsupportedVersion && isAdmin && context !== 'private' && <UpdateRocketChatButton />}
</ButtonGroup>
</PageHeader>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/ee/server/apps/orchestrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class AppServerOrchestrator {
try {
await canEnableApp(app.getStorageItem());

await this.getManager().loadOne(app.getID());
await this.getManager().loadOne(app.getID(), true);
} catch (error) {
this._rocketchatLogger.warn(`App "${app.getInfo().name}" could not be enabled: `, error.message);
}
Expand Down
6 changes: 3 additions & 3 deletions packages/apps-engine/src/server/AppManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ export class AppManager {
*
* @param appId the id of the application to load
*/
public async loadOne(appId: string): Promise<ProxiedApp> {
public async loadOne(appId: string, silenceStatus = false): Promise<ProxiedApp> {
const rl = this.apps.get(appId);

if (!rl) {
Expand All @@ -941,14 +941,14 @@ export class AppManager {

const item = rl.getStorageItem();

await this.initializeApp(item, rl, false);
await this.initializeApp(item, rl, false, silenceStatus);

if (!this.areRequiredSettingsSet(item)) {
await rl.setStatus(AppStatus.INVALID_SETTINGS_DISABLED);
}

if (!AppStatusUtils.isDisabled(await rl.getStatus()) && AppStatusUtils.isEnabled(rl.getPreviousStatus())) {
await this.enableApp(item, rl, false, rl.getPreviousStatus() === AppStatus.MANUALLY_ENABLED);
await this.enableApp(item, rl, false, rl.getPreviousStatus() === AppStatus.MANUALLY_ENABLED, silenceStatus);
}

return this.apps.get(item.id);
Expand Down

0 comments on commit f1c8ad8

Please sign in to comment.