mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 21:44:12 +08:00
Switch to a whitelist for enabling extensions
This commit is contained in:
parent
bc9e8f68f1
commit
4585f03ee3
|
@ -67,12 +67,21 @@ class EnableBundledExtensions implements Step
|
|||
);
|
||||
}
|
||||
|
||||
const DISABLED_EXTENSIONS = [
|
||||
'flarum-akismet',
|
||||
'flarum-auth-facebook',
|
||||
'flarum-auth-github',
|
||||
'flarum-auth-twitter',
|
||||
'flarum-pusher',
|
||||
const EXTENSION_WHITELIST = [
|
||||
'flarum-approval',
|
||||
'flarum-bbcode',
|
||||
'flarum-emoji',
|
||||
'flarum-lang-english',
|
||||
'flarum-flags',
|
||||
'flarum-likes',
|
||||
'flarum-lock',
|
||||
'flarum-markdown',
|
||||
'flarum-mentions',
|
||||
'flarum-statistics',
|
||||
'flarum-sticky',
|
||||
'flarum-subscriptions',
|
||||
'flarum-suspend',
|
||||
'flarum-tags',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -93,7 +102,7 @@ class EnableBundledExtensions implements Step
|
|||
|
||||
return $extension;
|
||||
})->filter(function (Extension $extension) {
|
||||
return ! in_array($extension->getId(), self::DISABLED_EXTENSIONS);
|
||||
return in_array($extension->getId(), self::EXTENSION_WHITELIST);
|
||||
})->sortBy(function (Extension $extension) {
|
||||
return $extension->composerJsonAttribute('extra.flarum-extension.title');
|
||||
})->mapWithKeys(function (Extension $extension) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user