Add OCI_REQUIRE_SU configuration option
This commit is contained in:
parent
fcdd844de4
commit
0b7e7a5e74
11
README.md
11
README.md
|
@ -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.
|
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_DRUSH_BIN=/usr/local/bin/drush
|
||||||
ALTERNC_WPCLI_BIN=/usr/local/bin/wp
|
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
|
# Extending
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,12 @@
|
||||||
class m_oci {
|
class m_oci {
|
||||||
|
|
||||||
function hook_menu() {
|
function hook_menu() {
|
||||||
global $hooks;
|
global $mem, $hooks, $L_OCI_REQUIRE_SU;
|
||||||
|
if ($L_OCI_REQUIRE_SU) {
|
||||||
|
if (!$mem->checkright()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
$menu = array(
|
$menu = array(
|
||||||
'title' => _('Quick Install'),
|
'title' => _('Quick Install'),
|
||||||
'ico' => 'images/ocilogo.png',
|
'ico' => 'images/ocilogo.png',
|
||||||
|
|
Loading…
Reference in New Issue