Add OCI_REQUIRE_SU configuration option

This commit is contained in:
Kienan Stewart 2018-02-17 09:55:46 -05:00
parent fcdd844de4
commit 0b7e7a5e74
2 changed files with 14 additions and 4 deletions

View File

@ -24,12 +24,17 @@ ALTERNC_BASE_PATH=/your/path/alternc/panel/ make install
Once installed, add the Drush or WP-CLI paths to /etc/alternc/locals.sh. These need to be accessible within the basedir restrictions of the AlternC panel.
Example: `
```
ALTERNC_DRUSH_BIN=/usr/local/bin/drush
ALTERNC_WPCLI_BIN=/usr/local/bin/wp
`
If they are not configured, the links for installation will be disabled. If no CMSs are configured, the quick links menu item will not be displayed.
# Option to limit the One-Click Installer menu to users who have 'su' on their
# account. Set to 1 to enable that restriction. Default is 0 (no restriction).
OCI_REQUIRE_SU=0
```
If they are not configured, the links for installation will be disabled. If no
CMSs are configured, the quick links menu item will not be displayed.
# Extending

View File

@ -21,7 +21,12 @@
class m_oci {
function hook_menu() {
global $hooks;
global $mem, $hooks, $L_OCI_REQUIRE_SU;
if ($L_OCI_REQUIRE_SU) {
if (!$mem->checkright()) {
return;
}
}
$menu = array(
'title' => _('Quick Install'),
'ico' => 'images/ocilogo.png',