Skip to content

Commit

Permalink
chore(package-manager): set min core version and add warning
Browse files Browse the repository at this point in the history
Signed-off-by: Sami Mazouz <[email protected]>
  • Loading branch information
SychO9 committed Sep 16, 2022
1 parent fd19645 commit 31c3cfc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/package-manager/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"source": "https://github.com/flarum/package-manager"
},
"require": {
"flarum/core": "^1.0.0",
"flarum/core": "^1.5.0",
"composer/composer": "^2.3"
},
"require-dev": {
Expand Down
8 changes: 8 additions & 0 deletions extensions/package-manager/js/src/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import jumpToQueue from './utils/jumpToQueue';
import extractText from 'flarum/common/utils/extractText';
import { AsyncBackendResponse } from './shims';
import PackageManagerState from './states/PackageManagerState';
import Alert from "@flarum/core/src/common/components/Alert";

app.initializers.add('flarum-package-manager', (app) => {
app.store.models['package-manager-tasks'] = Task;
Expand All @@ -19,6 +20,13 @@ app.initializers.add('flarum-package-manager', (app) => {

app.extensionData
.for('flarum-package-manager')
.registerSetting(() => (
<div className="Form-group">
<Alert type="warning" dismissible={false}>
{app.translator.trans('flarum-package-manager.admin.settings.access_warning')}
</Alert>
</div>
))
.registerSetting({
setting: 'flarum-package-manager.queue_jobs',
label: app.translator.trans('flarum-package-manager.admin.settings.queue_jobs'),
Expand Down
1 change: 1 addition & 0 deletions extensions/package-manager/locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ flarum-package-manager:
title: Queue

settings:
access_warning: Please be careful to who you give access to the admin area, the package manager could be misused by bad actors to install packages that can lead to security breaches.
queue_jobs: Run operations in the background queue
queue_jobs_help: >
You can read about a <a href='{basic_impl_link}'>basic queue</a> implementation or a <a href='{adv_impl_link}'>more advanced</a> one.
Expand Down

0 comments on commit 31c3cfc

Please sign in to comment.