mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-14 04:16:54 +01:00
* [ADD] Added warning messages for PHP extension checking
* [MOD] Improved updates and notification checking * [MOD] Improved backup process * [MOD] Updated translations
This commit is contained in:
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,7 @@ use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\UnauthorizedPageException;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\Core\Events\EventMessage;
|
||||
use SP\Core\Exceptions\CheckException;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Exceptions\ValidationException;
|
||||
use SP\Http\JsonResponse;
|
||||
@@ -280,9 +281,15 @@ final class ConfigLdapController extends SimpleControllerBase
|
||||
try {
|
||||
$this->checks();
|
||||
$this->checkAccess(Acl::CONFIG_LDAP);
|
||||
|
||||
$this->extensionChecker->checkLdapAvailable(true);
|
||||
} catch (UnauthorizedPageException $e) {
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
$this->returnJsonResponseException($e);
|
||||
} catch (CheckException $e) {
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
$this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ final class ConfigManagerController extends ControllerBase
|
||||
* @return DataTab
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
* @throws \SP\Core\Exceptions\CheckException
|
||||
*/
|
||||
protected function getConfigGeneral()
|
||||
{
|
||||
@@ -143,6 +144,8 @@ final class ConfigManagerController extends ControllerBase
|
||||
$template->assign('userGroups', SelectItemAdapter::factory(UserGroupService::getItemsBasic())->getItemsFromModel());
|
||||
$template->assign('userProfiles', SelectItemAdapter::factory(UserProfileService::getItemsBasic())->getItemsFromModel());
|
||||
|
||||
$template->assign('curlIsAvailable', $this->extensionChecker->checkCurlAvailable());
|
||||
|
||||
$template->assign('logEvents', SelectItemAdapter::factory(array_merge(DatabaseLogHandler::EVENTS, $this->configData->getLogEvents()))
|
||||
->getItemsFromArraySelected($this->configData->getLogEvents(), true)
|
||||
);
|
||||
@@ -152,18 +155,21 @@ final class ConfigManagerController extends ControllerBase
|
||||
|
||||
/**
|
||||
* @return DataTab
|
||||
* @throws \SP\Core\Exceptions\CheckException
|
||||
*/
|
||||
protected function getAccountConfig()
|
||||
{
|
||||
$template = clone $this->view;
|
||||
$template->setBase('config');
|
||||
$template->addTemplate('accounts');
|
||||
$template->assign('gdIsAvailable', $this->extensionChecker->checkGdAvailable());
|
||||
|
||||
return new DataTab(__('Cuentas'), $template);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DataTab
|
||||
* @throws \SP\Core\Exceptions\CheckException
|
||||
*/
|
||||
protected function getWikiConfig()
|
||||
{
|
||||
@@ -171,6 +177,8 @@ final class ConfigManagerController extends ControllerBase
|
||||
$template->setBase('config');
|
||||
$template->addTemplate('wiki');
|
||||
|
||||
$template->assign('curlIsAvailable', $this->extensionChecker->checkCurlAvailable());
|
||||
|
||||
return new DataTab(__('Wiki'), $template);
|
||||
}
|
||||
|
||||
@@ -178,6 +186,7 @@ final class ConfigManagerController extends ControllerBase
|
||||
* @return DataTab
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
* @throws \SP\Core\Exceptions\CheckException
|
||||
*/
|
||||
protected function getLdapConfig()
|
||||
{
|
||||
@@ -252,12 +261,14 @@ final class ConfigManagerController extends ControllerBase
|
||||
|
||||
/**
|
||||
* @return DataTab
|
||||
* @throws \SP\Core\Exceptions\CheckException
|
||||
*/
|
||||
protected function getBackupConfig()
|
||||
{
|
||||
$template = clone $this->view;
|
||||
$template->setBase('config');
|
||||
$template->addTemplate('backup');
|
||||
$template->assign('pharIsAvailable', $this->extensionChecker->checkPharAvailable());
|
||||
|
||||
$template->assign('siteName', Util::getAppInfo('appname'));
|
||||
$template->assign('backupDir', BACKUP_PATH);
|
||||
@@ -336,6 +347,7 @@ final class ConfigManagerController extends ControllerBase
|
||||
$template->assign('plugins', $this->dic->get(PluginManager::class)->getLoadedPlugins());
|
||||
$template->assign('locale', Language::$localeStatus ?: sprintf('%s (%s)', $this->configData->getSiteLang(), __('No instalado')));
|
||||
$template->assign('securedSession', CryptSessionHandler::$isSecured);
|
||||
$template->assign('missingExtensions', $this->extensionChecker->getMissing());
|
||||
|
||||
return new DataTab(__('Información'), $template);
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use DI\Container;
|
||||
use Interop\Container\ContainerInterface;
|
||||
use Klein\Klein;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use SP\Config\Config;
|
||||
use SP\Config\ConfigData;
|
||||
use SP\Core\Acl\Acl;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
namespace SP\Modules\Web\Controllers;
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use SP\Core\Exceptions\CheckException;
|
||||
use SP\Http\JsonResponse;
|
||||
use SP\Modules\Web\Controllers\Traits\JsonTrait;
|
||||
@@ -47,51 +48,53 @@ final class StatusController extends SimpleControllerBase
|
||||
public function checkReleaseAction()
|
||||
{
|
||||
try {
|
||||
$this->extensionChecker->checkCurlAvailable();
|
||||
} catch (CheckException $e) {
|
||||
$this->extensionChecker->checkCurlAvailable(true);
|
||||
|
||||
$request = $this->dic->get(Client::class)
|
||||
->request('GET', Util::getAppInfo('appupdates'));
|
||||
|
||||
if ($request->getStatusCode() === 200
|
||||
&& strpos($request->getHeaderLine('content-type'), 'application/json') !== false
|
||||
) {
|
||||
$requestData = json_decode($request->getBody());
|
||||
|
||||
if ($requestData !== null && !isset($requestData->message)) {
|
||||
// $updateInfo[0]->tag_name
|
||||
// $updateInfo[0]->name
|
||||
// $updateInfo[0]->body
|
||||
// $updateInfo[0]->tarball_url
|
||||
// $updateInfo[0]->zipball_url
|
||||
// $updateInfo[0]->published_at
|
||||
// $updateInfo[0]->html_url
|
||||
|
||||
if (preg_match('/v?(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.(?P<build>\d+)(?P<pre_release>\-[a-z0-9\.]+)?$/', $requestData->tag_name, $matches)) {
|
||||
$pubVersion = $matches['major'] . $matches['minor'] . $matches['patch'] . '.' . $matches['build'];
|
||||
|
||||
if (Util::checkVersion(Util::getVersionStringNormalized(), $pubVersion)) {
|
||||
$this->returnJsonResponseData([
|
||||
'version' => $requestData->tag_name,
|
||||
'url' => $requestData->html_url,
|
||||
'title' => $requestData->name,
|
||||
'description' => $requestData->body,
|
||||
'date' => $requestData->published_at
|
||||
]);
|
||||
}
|
||||
|
||||
$this->returnJsonResponseData([]);
|
||||
}
|
||||
}
|
||||
|
||||
logger($requestData->message);
|
||||
}
|
||||
|
||||
$this->returnJsonResponse(JsonResponse::JSON_ERROR, __u('Versión no disponible'));
|
||||
} catch (ClientException $e) {
|
||||
processException($e);
|
||||
|
||||
$this->returnJsonResponseException($e);
|
||||
} catch (CheckException $e) {
|
||||
$this->returnJsonResponseException($e);
|
||||
}
|
||||
|
||||
$request = $this->dic->get(Client::class)
|
||||
->request('GET', Util::getAppInfo('appupdates'));
|
||||
|
||||
if ($request->getStatusCode() === 200
|
||||
&& strpos($request->getHeaderLine('content-type'), 'application/json') !== false
|
||||
) {
|
||||
$requestData = json_decode($request->getBody());
|
||||
|
||||
if ($requestData !== null && !isset($requestData->message)) {
|
||||
// $updateInfo[0]->tag_name
|
||||
// $updateInfo[0]->name
|
||||
// $updateInfo[0]->body
|
||||
// $updateInfo[0]->tarball_url
|
||||
// $updateInfo[0]->zipball_url
|
||||
// $updateInfo[0]->published_at
|
||||
// $updateInfo[0]->html_url
|
||||
|
||||
if (preg_match('/v?(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.(?P<build>\d+)(?P<pre_release>\-[a-z0-9\.]+)?$/', $requestData->tag_name, $matches)) {
|
||||
$pubVersion = $matches['major'] . $matches['minor'] . $matches['patch'] . '.' . $matches['build'];
|
||||
|
||||
if (Util::checkVersion(Util::getVersionStringNormalized(), $pubVersion)) {
|
||||
$this->returnJsonResponseData([
|
||||
'version' => $requestData->tag_name,
|
||||
'url' => $requestData->html_url,
|
||||
'title' => $requestData->name,
|
||||
'description' => $requestData->body,
|
||||
'date' => $requestData->published_at
|
||||
]);
|
||||
}
|
||||
|
||||
$this->returnJsonResponseData([]);
|
||||
}
|
||||
}
|
||||
|
||||
logger($requestData->message);
|
||||
}
|
||||
|
||||
$this->returnJsonResponse(JsonResponse::JSON_ERROR, __u('Versión no disponible'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,38 +105,40 @@ final class StatusController extends SimpleControllerBase
|
||||
public function checkNoticesAction()
|
||||
{
|
||||
try {
|
||||
$this->extensionChecker->checkCurlAvailable();
|
||||
} catch (CheckException $e) {
|
||||
$this->extensionChecker->checkCurlAvailable(true);
|
||||
|
||||
$request = $this->dic->get(Client::class)
|
||||
->request('GET', Util::getAppInfo('appnotices'));
|
||||
|
||||
if ($request->getStatusCode() === 200
|
||||
&& strpos($request->getHeaderLine('content-type'), 'application/json') !== false
|
||||
) {
|
||||
$requestData = json_decode($request->getBody());
|
||||
|
||||
if ($requestData !== null && !isset($requestData->message)) {
|
||||
$notices = [];
|
||||
|
||||
foreach ($requestData as $notice) {
|
||||
$notices[] = [
|
||||
'title' => $notice->title,
|
||||
'date' => $notice->created_at,
|
||||
'text' => $notice->body
|
||||
];
|
||||
}
|
||||
|
||||
$this->returnJsonResponseData($notices);
|
||||
}
|
||||
|
||||
logger($requestData->message);
|
||||
}
|
||||
|
||||
$this->returnJsonResponse(JsonResponse::JSON_ERROR, __u('Notificaciones no disponibles'));
|
||||
} catch (ClientException $e) {
|
||||
processException($e);
|
||||
|
||||
$this->returnJsonResponseException($e);
|
||||
} catch (CheckException $e) {
|
||||
$this->returnJsonResponseException($e);
|
||||
}
|
||||
|
||||
$request = $this->dic->get(Client::class)
|
||||
->request('GET', Util::getAppInfo('appnotices'));
|
||||
|
||||
if ($request->getStatusCode() === 200
|
||||
&& strpos($request->getHeaderLine('content-type'), 'application/json') !== false
|
||||
) {
|
||||
$requestData = json_decode($request->getBody());
|
||||
|
||||
if ($requestData !== null && !isset($requestData->message)) {
|
||||
$notices = [];
|
||||
|
||||
foreach ($requestData as $notice) {
|
||||
$notices[] = [
|
||||
'title' => $notice->title,
|
||||
'date' => $notice->created_at,
|
||||
'text' => $notice->body
|
||||
];
|
||||
}
|
||||
|
||||
$this->returnJsonResponseData($notices);
|
||||
}
|
||||
|
||||
logger($requestData->message);
|
||||
}
|
||||
|
||||
$this->returnJsonResponse(JsonResponse::JSON_ERROR, __u('Notificaciones no disponibles'));
|
||||
}
|
||||
}
|
||||
@@ -1128,6 +1128,16 @@ fieldset.warning {
|
||||
.opacity50 {
|
||||
opacity: .5 !important; }
|
||||
|
||||
.msg-option-unvailable {
|
||||
color: #ffca28;
|
||||
background-color: #fff8e1;
|
||||
border: 1px solid #ffca28;
|
||||
border: none;
|
||||
padding: .5em;
|
||||
text-align: center;
|
||||
margin: 1em 0;
|
||||
font-size: 1.5em; }
|
||||
|
||||
#box-pub-noheader #box-login {
|
||||
position: relative;
|
||||
min-height: 14em; }
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1152,6 +1152,15 @@ fieldset.warning {
|
||||
opacity: .5 !important;
|
||||
}
|
||||
|
||||
.msg-option-unvailable {
|
||||
@include color-amber();
|
||||
border: none;
|
||||
padding: .5em;
|
||||
text-align: center;
|
||||
margin: 1em 0;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
@import "login";
|
||||
|
||||
/* Default styles first then media queries */
|
||||
|
||||
@@ -4,6 +4,18 @@
|
||||
* @var \SP\Config\ConfigData $configData
|
||||
*/ ?>
|
||||
|
||||
<?php if (!$gdIsAvailable): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('La extensión \'%s\' no está disponible'), 'gd'); ?>
|
||||
<i id="help-gd" class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-gd">
|
||||
<p>
|
||||
<?php echo __('Esta extensión es necesaria para mostrar las claves como imágenes'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" name="frmAccounts" id="frmAccounts" class="form-action"
|
||||
data-onsubmit="config/save"
|
||||
data-action-route="configAccount/save"
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
<?php /** @var $icons \SP\Core\UI\ThemeIcons */ ?>
|
||||
|
||||
<?php if (!$pharIsAvailable): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('La extensión \'%s\' no está disponible'), 'phar'); ?>
|
||||
<i id="help-phar" class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-phar">
|
||||
<p>
|
||||
<?php echo __('Esta extensión es necesaria para generar los archivos de copia de seguridad de la aplicación'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">backup</i>
|
||||
<?php echo __('Copia de Seguridad'); ?>
|
||||
|
||||
@@ -5,6 +5,18 @@
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if (!$curlIsAvailable): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('La extensión \'%s\' no está disponible'), 'curl'); ?>
|
||||
<i id="help-curl" class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-curl">
|
||||
<p>
|
||||
<?php echo __('Esta extensión es necesaria comprobar las actualizaciones y notificaciones'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">home</i>
|
||||
<?php echo __('Sitio'); ?>
|
||||
|
||||
@@ -39,6 +39,12 @@
|
||||
<br>
|
||||
<?php printf('%s: %s', \SP\Html\Html::strongText(__('Extensiones')), implode(', ', get_loaded_extensions())); ?>
|
||||
<br>
|
||||
<?php
|
||||
if (!empty($missingExtensions)) {
|
||||
printf('%s: %s', \SP\Html\Html::strongText(__('Extensiones no disponibles')), implode(', ', $missingExtensions));
|
||||
echo '<br>';
|
||||
}
|
||||
?>
|
||||
<?php printf('%s: %d KB', \SP\Html\Html::strongText(__('Memoria Usada')), (memory_get_usage(true) / 1024)); ?>
|
||||
<br>
|
||||
<?php printf('%s: %s', \SP\Html\Html::strongText(__('Usuario')), (!$isDemo) ? get_current_user() : '***'); ?>
|
||||
|
||||
@@ -4,31 +4,42 @@
|
||||
* @var \SP\Config\ConfigData $configData
|
||||
*/ ?>
|
||||
|
||||
<?php if ($ldapIsAvailable || $isDemo): ?>
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">business</i>
|
||||
<?php echo __('Configuración'); ?>
|
||||
<?php if (!$ldapIsAvailable): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('La extensión \'%s\' no está disponible'), 'ldap'); ?>
|
||||
<i id="help-ldap" class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap">
|
||||
<p>
|
||||
<?php echo __('Esta extensión es necesaria conectar con el servidor de LDAP'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" name="frmLdap" id="frmLdap" class="form-action"
|
||||
data-onsubmit="config/save"
|
||||
data-action-route="configLdap/save"
|
||||
data-hash="">
|
||||
<table id="tblLdap" class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField"></td>
|
||||
<td class="valField">
|
||||
<ul class="config-ldap-list-action mdl-list">
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<div class="mdl-switch__box">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="ldap_enabled">
|
||||
<input type="checkbox" id="ldap_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="ldap_enabled" <?php echo $configData->isLdapEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">business</i>
|
||||
<?php echo __('Configuración'); ?>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<form method="post" name="frmLdap" id="frmLdap" class="form-action"
|
||||
data-onsubmit="config/save"
|
||||
data-action-route="configLdap/save"
|
||||
data-hash="">
|
||||
<table id="tblLdap" class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField"></td>
|
||||
<td class="valField">
|
||||
<ul class="config-ldap-list-action mdl-list">
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<div class="mdl-switch__box">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="ldap_enabled">
|
||||
<input type="checkbox" id="ldap_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="ldap_enabled" <?php echo $configData->isLdapEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Habilitar LDAP'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Habilita de autentificación mediante servidor LDAP.'); ?>
|
||||
@@ -36,409 +47,400 @@
|
||||
<?php echo __('Este método utilizará MySQL en caso de fallo.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<div class="mdl-switch__box">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="ldap_ads_enabled">
|
||||
<input type="checkbox" id="ldap_ads_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="ldap_ads_enabled" <?php echo $configData->isLdapAds() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<div class="mdl-switch__box">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="ldap_ads_enabled">
|
||||
<input type="checkbox" id="ldap_ads_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="ldap_ads_enabled" <?php echo $configData->isLdapAds() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Active Directory'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Habilita el modo de conexión con LDAP de Active Directory.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Servidor'); ?>
|
||||
<div id="help-ldap_server"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_server">
|
||||
<p>
|
||||
<?php echo __('Nombre o dirección IP del servidor de LDAP.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Ejemplos:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>ldap.example.org</li>
|
||||
<li>ldap://ldap.example.org</li>
|
||||
<li>ldaps://ldap.example.org</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_server" name="ldap_server" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapServer(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_server"><?php echo __('Servidor'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Usuario de conexión'); ?>
|
||||
<div id="help-ldap_binduser"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_binduser">
|
||||
<p>
|
||||
<?php echo __('Usuario para conectar con el servicio de LDAP.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Ejemplos:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>cn=syspass,ou=Users,dc=syspass,o=org</li>
|
||||
<li>syspass</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_binduser" name="ldap_binduser" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapBindUser(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_binduser"><?php echo __('Usuario'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Clave de conexión'); ?>
|
||||
<div id="help-ldap_bindpass"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_bindpass">
|
||||
<p>
|
||||
<?php echo __('Clave del usuario de conexión a LDAP.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_bindpass" name="ldap_bindpass" type="password"
|
||||
class="mdl-textfield__input passwordfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapBindPass() ? '***' : ''; ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_bindpass"><?php echo __('Clave'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Base de búsqueda'); ?>
|
||||
<div id="help-ldap_base"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_base">
|
||||
<p>
|
||||
<?php echo __('Base en la que realizar la búsqueda de usuarios de LDAP.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Ejemplos:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>cn=Users,dc=example,dc=org</li>
|
||||
<li>ou=AdminUsers,dc=example,o=org</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_base" name="ldap_base" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapBase(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_base"><?php echo __('Base de búsqueda'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Grupo'); ?>
|
||||
<div id="help-ldap_group"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_group">
|
||||
<p>
|
||||
<?php echo __('Grupo de LDAP al que debe de pertenecer el usuario para permitir el acceso.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Este grupo debe de estar ubicado en la base de búsquedas de LDAP.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Ejemplos:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>cn=GRP_SPUSERS,cn=Users,dc=example,dc=org</li>
|
||||
<li>GRP_SPUSERS</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_group" name="ldap_group" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapGroup(); ?>"/>
|
||||
<label class="mdl-textfield__label" for="ldap_group"><?php echo __('Grupo'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Grupo por Defecto'); ?>
|
||||
<div id="help-ldap_defaultgroup"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_defaultgroup">
|
||||
<p>
|
||||
<?php echo __('Define el grupo de usuarios por defecto para los nuevos usuarios de LDAP.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Grupo por Defecto'); ?></div>
|
||||
|
||||
<select id="ldap_defaultgroup" name="ldap_defaultgroup"
|
||||
class="select-box sel-chosen-usergroup" required>
|
||||
<option value=""><?php echo __('Seleccionar Grupo'); ?></option>
|
||||
<?php /** @var \SP\Mvc\View\Components\SelectItem[] $userGroups */
|
||||
foreach ($userGroups as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>" <?php echo $userGroup->getId() === $configData->getLdapDefaultGroup() ? 'selected' : ''; ?>><?php echo $userGroup->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Perfil por Defecto'); ?>
|
||||
<div id="help-ldap_defaultprofile"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_defaultprofile">
|
||||
<p>
|
||||
<?php echo __('Define el perfil de usuarios por defecto para los nuevos usuarios de LDAP.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Perfil por Defecto'); ?></div>
|
||||
|
||||
<select id="ldap_defaultprofile" name="ldap_defaultprofile"
|
||||
class="select-box sel-chosen-profile" required>
|
||||
<option value=""><?php echo __('Seleccionar Usuario'); ?></option>
|
||||
<?php /** @var \SP\Mvc\View\Components\SelectItem[] $userProfiles */
|
||||
foreach ($userProfiles as $userProfile): ?>
|
||||
<option
|
||||
value="<?php echo $userProfile->getId(); ?>" <?php echo ($userProfile->getId() === $configData->getLdapDefaultProfile()) ? 'selected' : ''; ?>><?php echo $userProfile->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="tab-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Atrás'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
data-onclick="ldap/check"
|
||||
data-action-route="configLdap/check"
|
||||
data-src="#frmLdap"
|
||||
title="<?php echo $icons->getIconCheck()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconCheck()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmLdap"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">import_export</i>
|
||||
<?php echo __('Importación'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblLdap" class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Atributo Login'); ?>
|
||||
<div id="help-ldap_login_attribute"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_login_attribute">
|
||||
<p>
|
||||
<?php echo __('Define el atributo a utilizar para el login del usuario en la importación.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Atributo Login'); ?></div>
|
||||
|
||||
<select id="ldap_login_attribute" name="ldap_login_attribute"
|
||||
class="select-box" required>
|
||||
<option value="samaccountname" selected>sAMAccountName</option>
|
||||
<option value="userprincipalname">userPrincipalName</option>
|
||||
<option value="uid">uid</option>
|
||||
<option value="login">login</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Atributo Nombre'); ?>
|
||||
<div id="help-ldap_username_attribute"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_username_attribute">
|
||||
<p>
|
||||
<?php echo __('Define el atributo a utilizar para el nombre del usuario en la importación.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Atributo Nombre'); ?></div>
|
||||
|
||||
<select id="ldap_username_attribute" name="ldap_username_attribute"
|
||||
class="select-box" required>
|
||||
<option value="displayname" selected>displayName</option>
|
||||
<option value="fullname">fullName</option>
|
||||
<option value="cn">cn</option>
|
||||
<option value="name">name</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"></td>
|
||||
<td class="valField">
|
||||
<ul class="config-ldap-list-action mdl-list">
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<div class="mdl-switch__box">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="ldap_import_groups">
|
||||
<input type="checkbox" id="ldap_import_groups"
|
||||
class="mdl-switch__input"
|
||||
name="ldap_import_groups" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Importar Grupos'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"></span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Atributo Nombre Grupo'); ?>
|
||||
<div id="help-ldap_groupname_attribute"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_groupname_attribute">
|
||||
<p>
|
||||
<?php echo __('Define el atributo a utilizar para el nombre del grupo en la importación.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Atributo Nombre Grupo'); ?></div>
|
||||
|
||||
<select id="ldap_groupname_attribute" name="ldap_groupname_attribute"
|
||||
class="select-box" required>
|
||||
<option value="cn">cn</option>
|
||||
<option value="name">name</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Filtro'); ?>
|
||||
<div id="help-ldap_import_filter"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_import_filter">
|
||||
<p>
|
||||
<?php echo __('Filtro para importar usuarios o grupos de LDAP.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_import_filter" name="ldap_import_filter" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_import_filter"><?php echo __('Filtro'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="tab-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Atrás'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
data-onclick="ldap/check"
|
||||
data-action-route="configLdap/checkImport"
|
||||
data-src="#frmLdap"
|
||||
title="<?php echo $icons->getIconCheck()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconCheck()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored"
|
||||
data-onclick="ldap/import"
|
||||
data-action-route="configLdap/import"
|
||||
data-src="#frmLdap"
|
||||
title="<?php echo __('Importar usuarios de LDAP'); ?>">
|
||||
<i class="material-icons">get_app</i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<table id="tblLdap" class="data tblConfig round">
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="option-disabled">
|
||||
<?php echo __('Módulo no disponible'); ?>
|
||||
<td class="descField">
|
||||
<?php echo __('Servidor'); ?>
|
||||
<div id="help-ldap_server"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_server">
|
||||
<p>
|
||||
<?php echo __('Nombre o dirección IP del servidor de LDAP.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Ejemplos:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>ldap.example.org</li>
|
||||
<li>ldap://ldap.example.org</li>
|
||||
<li>ldaps://ldap.example.org</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_server" name="ldap_server" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapServer(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_server"><?php echo __('Servidor'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Usuario de conexión'); ?>
|
||||
<div id="help-ldap_binduser"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_binduser">
|
||||
<p>
|
||||
<?php echo __('Usuario para conectar con el servicio de LDAP.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Ejemplos:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>cn=syspass,ou=Users,dc=syspass,o=org</li>
|
||||
<li>syspass</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_binduser" name="ldap_binduser" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapBindUser(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_binduser"><?php echo __('Usuario'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Clave de conexión'); ?>
|
||||
<div id="help-ldap_bindpass"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_bindpass">
|
||||
<p>
|
||||
<?php echo __('Clave del usuario de conexión a LDAP.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_bindpass" name="ldap_bindpass" type="password"
|
||||
class="mdl-textfield__input passwordfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapBindPass() ? '***' : ''; ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_bindpass"><?php echo __('Clave'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Base de búsqueda'); ?>
|
||||
<div id="help-ldap_base"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_base">
|
||||
<p>
|
||||
<?php echo __('Base en la que realizar la búsqueda de usuarios de LDAP.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Ejemplos:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>cn=Users,dc=example,dc=org</li>
|
||||
<li>ou=AdminUsers,dc=example,o=org</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_base" name="ldap_base" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapBase(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_base"><?php echo __('Base de búsqueda'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Grupo'); ?>
|
||||
<div id="help-ldap_group"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_group">
|
||||
<p>
|
||||
<?php echo __('Grupo de LDAP al que debe de pertenecer el usuario para permitir el acceso.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Este grupo debe de estar ubicado en la base de búsquedas de LDAP.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Ejemplos:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>cn=GRP_SPUSERS,cn=Users,dc=example,dc=org</li>
|
||||
<li>GRP_SPUSERS</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_group" name="ldap_group" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128" value="<?php echo $configData->getLdapGroup(); ?>"/>
|
||||
<label class="mdl-textfield__label" for="ldap_group"><?php echo __('Grupo'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Grupo por Defecto'); ?>
|
||||
<div id="help-ldap_defaultgroup"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_defaultgroup">
|
||||
<p>
|
||||
<?php echo __('Define el grupo de usuarios por defecto para los nuevos usuarios de LDAP.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Grupo por Defecto'); ?></div>
|
||||
|
||||
<select id="ldap_defaultgroup" name="ldap_defaultgroup"
|
||||
class="select-box sel-chosen-usergroup" required>
|
||||
<option value=""><?php echo __('Seleccionar Grupo'); ?></option>
|
||||
<?php /** @var \SP\Mvc\View\Components\SelectItem[] $userGroups */
|
||||
foreach ($userGroups as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>" <?php echo $userGroup->getId() === $configData->getLdapDefaultGroup() ? 'selected' : ''; ?>><?php echo $userGroup->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Perfil por Defecto'); ?>
|
||||
<div id="help-ldap_defaultprofile"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_defaultprofile">
|
||||
<p>
|
||||
<?php echo __('Define el perfil de usuarios por defecto para los nuevos usuarios de LDAP.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Perfil por Defecto'); ?></div>
|
||||
|
||||
<select id="ldap_defaultprofile" name="ldap_defaultprofile"
|
||||
class="select-box sel-chosen-profile" required>
|
||||
<option value=""><?php echo __('Seleccionar Usuario'); ?></option>
|
||||
<?php /** @var \SP\Mvc\View\Components\SelectItem[] $userProfiles */
|
||||
foreach ($userProfiles as $userProfile): ?>
|
||||
<option
|
||||
value="<?php echo $userProfile->getId(); ?>" <?php echo ($userProfile->getId() === $configData->getLdapDefaultProfile()) ? 'selected' : ''; ?>><?php echo $userProfile->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div class="tab-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Atrás'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
data-onclick="ldap/check"
|
||||
data-action-route="configLdap/check"
|
||||
data-src="#frmLdap"
|
||||
title="<?php echo $icons->getIconCheck()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconCheck()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmLdap"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">import_export</i>
|
||||
<?php echo __('Importación'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblLdap" class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Atributo Login'); ?>
|
||||
<div id="help-ldap_login_attribute"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_login_attribute">
|
||||
<p>
|
||||
<?php echo __('Define el atributo a utilizar para el login del usuario en la importación.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Atributo Login'); ?></div>
|
||||
|
||||
<select id="ldap_login_attribute" name="ldap_login_attribute"
|
||||
class="select-box" required>
|
||||
<option value="samaccountname" selected>sAMAccountName</option>
|
||||
<option value="userprincipalname">userPrincipalName</option>
|
||||
<option value="uid">uid</option>
|
||||
<option value="login">login</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Atributo Nombre'); ?>
|
||||
<div id="help-ldap_username_attribute"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_username_attribute">
|
||||
<p>
|
||||
<?php echo __('Define el atributo a utilizar para el nombre del usuario en la importación.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Atributo Nombre'); ?></div>
|
||||
|
||||
<select id="ldap_username_attribute" name="ldap_username_attribute"
|
||||
class="select-box" required>
|
||||
<option value="displayname" selected>displayName</option>
|
||||
<option value="fullname">fullName</option>
|
||||
<option value="cn">cn</option>
|
||||
<option value="name">name</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"></td>
|
||||
<td class="valField">
|
||||
<ul class="config-ldap-list-action mdl-list">
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<div class="mdl-switch__box">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="ldap_import_groups">
|
||||
<input type="checkbox" id="ldap_import_groups"
|
||||
class="mdl-switch__input"
|
||||
name="ldap_import_groups"/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Importar Grupos'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"></span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Atributo Nombre Grupo'); ?>
|
||||
<div id="help-ldap_groupname_attribute"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_groupname_attribute">
|
||||
<p>
|
||||
<?php echo __('Define el atributo a utilizar para el nombre del grupo en la importación.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Atributo Nombre Grupo'); ?></div>
|
||||
|
||||
<select id="ldap_groupname_attribute" name="ldap_groupname_attribute"
|
||||
class="select-box" required>
|
||||
<option value="cn">cn</option>
|
||||
<option value="name">name</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Filtro'); ?>
|
||||
<div id="help-ldap_import_filter"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap_import_filter">
|
||||
<p>
|
||||
<?php echo __('Filtro para importar usuarios o grupos de LDAP.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ldap_import_filter" name="ldap_import_filter" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_import_filter"><?php echo __('Filtro'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="tab-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Atrás'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
data-onclick="ldap/check"
|
||||
data-action-route="configLdap/checkImport"
|
||||
data-src="#frmLdap"
|
||||
title="<?php echo $icons->getIconCheck()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconCheck()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored"
|
||||
data-onclick="ldap/import"
|
||||
data-action-route="configLdap/import"
|
||||
data-src="#frmLdap"
|
||||
title="<?php echo __('Importar usuarios de LDAP'); ?>">
|
||||
<i class="material-icons">get_app</i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
@@ -4,6 +4,18 @@
|
||||
* @var \SP\Config\ConfigData $configData
|
||||
*/ ?>
|
||||
|
||||
<?php if (!$curlIsAvailable): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('La extensión \'%s\' no está disponible'), 'curl'); ?>
|
||||
<i id="help-curl" class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-curl">
|
||||
<p>
|
||||
<?php echo __('Esta extensión es necesaria conectar con DokuWiki'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" name="frmWiki" id="frmWiki" class="form-action"
|
||||
data-onsubmit="config/save"
|
||||
data-action-route="configWiki/save"
|
||||
|
||||
@@ -31,11 +31,8 @@
|
||||
"monolog/monolog": "^1.23"
|
||||
},
|
||||
"require-dev": {
|
||||
"squizlabs/php_codesniffer": "3.*",
|
||||
"phpunit/phpunit": "^6",
|
||||
"phpunit/dbunit": "^3",
|
||||
"pdepend/pdepend" : "@stable",
|
||||
"phpmd/phpmd" : "@stable",
|
||||
"symfony/debug" : "~v3.4"
|
||||
},
|
||||
"autoload": {
|
||||
|
||||
368
composer.lock
generated
368
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "3c5fb049f0800c80b32afa323e535fd2",
|
||||
"content-hash": "c2cd9288ce46a66ef3ed3403602673d5",
|
||||
"packages": [
|
||||
{
|
||||
"name": "ademarre/binary-to-text-php",
|
||||
@@ -1808,46 +1808,6 @@
|
||||
],
|
||||
"time": "2017-10-19T19:58:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pdepend/pdepend",
|
||||
"version": "2.5.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pdepend/pdepend.git",
|
||||
"reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pdepend/pdepend/zipball/9daf26d0368d4a12bed1cacae1a9f3a6f0adf239",
|
||||
"reference": "9daf26d0368d4a12bed1cacae1a9f3a6f0adf239",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.7",
|
||||
"symfony/config": "^2.3.0|^3|^4",
|
||||
"symfony/dependency-injection": "^2.3.0|^3|^4",
|
||||
"symfony/filesystem": "^2.3.0|^3|^4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8|^5.7",
|
||||
"squizlabs/php_codesniffer": "^2.0.0"
|
||||
},
|
||||
"bin": [
|
||||
"src/bin/pdepend"
|
||||
],
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PDepend\\": "src/main/php/PDepend"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"description": "Official version of pdepend to be handled with Composer",
|
||||
"time": "2017-12-13T13:21:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
"version": "1.0.1",
|
||||
@@ -2102,72 +2062,6 @@
|
||||
],
|
||||
"time": "2017-07-14T14:27:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpmd/phpmd",
|
||||
"version": "2.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpmd/phpmd.git",
|
||||
"reference": "4e9924b2c157a3eb64395460fcf56b31badc8374"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpmd/phpmd/zipball/4e9924b2c157a3eb64395460fcf56b31badc8374",
|
||||
"reference": "4e9924b2c157a3eb64395460fcf56b31badc8374",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-xml": "*",
|
||||
"pdepend/pdepend": "^2.5",
|
||||
"php": ">=5.3.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.0",
|
||||
"squizlabs/php_codesniffer": "^2.0"
|
||||
},
|
||||
"bin": [
|
||||
"src/bin/phpmd"
|
||||
],
|
||||
"type": "project",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"PHPMD\\": "src/main/php"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Manuel Pichler",
|
||||
"email": "github@manuel-pichler.de",
|
||||
"homepage": "https://github.com/manuelpichler",
|
||||
"role": "Project Founder"
|
||||
},
|
||||
{
|
||||
"name": "Other contributors",
|
||||
"homepage": "https://github.com/phpmd/phpmd/graphs/contributors",
|
||||
"role": "Contributors"
|
||||
},
|
||||
{
|
||||
"name": "Marc Würth",
|
||||
"email": "ravage@bluewin.ch",
|
||||
"homepage": "https://github.com/ravage84",
|
||||
"role": "Project Maintainer"
|
||||
}
|
||||
],
|
||||
"description": "PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.",
|
||||
"homepage": "http://phpmd.org/",
|
||||
"keywords": [
|
||||
"mess detection",
|
||||
"mess detector",
|
||||
"pdepend",
|
||||
"phpmd",
|
||||
"pmd"
|
||||
],
|
||||
"time": "2017-01-20T14:41:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpspec/prophecy",
|
||||
"version": "1.7.6",
|
||||
@@ -3234,133 +3128,18 @@
|
||||
"homepage": "https://github.com/sebastianbergmann/version",
|
||||
"time": "2016-10-03T07:35:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "3.3.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||
"reference": "628a481780561150481a9ec74709092b9759b3ec"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/628a481780561150481a9ec74709092b9759b3ec",
|
||||
"reference": "628a481780561150481a9ec74709092b9759b3ec",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-simplexml": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/phpcs",
|
||||
"bin/phpcbf"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Greg Sherwood",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
||||
"homepage": "http://www.squizlabs.com/php-codesniffer",
|
||||
"keywords": [
|
||||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2018-07-26T23:47:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/config",
|
||||
"version": "v3.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/config.git",
|
||||
"reference": "1fffdeb349ff36a25184e5564c25289b1dbfc402"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/config/zipball/1fffdeb349ff36a25184e5564c25289b1dbfc402",
|
||||
"reference": "1fffdeb349ff36a25184e5564c25289b1dbfc402",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"symfony/filesystem": "~2.8|~3.0|~4.0",
|
||||
"symfony/polyfill-ctype": "~1.8"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/dependency-injection": "<3.3",
|
||||
"symfony/finder": "<3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/dependency-injection": "~3.3|~4.0",
|
||||
"symfony/event-dispatcher": "~3.3|~4.0",
|
||||
"symfony/finder": "~3.3|~4.0",
|
||||
"symfony/yaml": "~3.0|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/yaml": "To use the yaml reference dumper"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Config\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Config Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-06-19T14:02:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
"version": "v3.4.13",
|
||||
"version": "v3.4.14",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/debug.git",
|
||||
"reference": "0e3ca9cbde90fffec8038f4d4e16fd4046bbd018"
|
||||
"reference": "d5a058ff6ecad26b30c1ba452241306ea34c65cc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/0e3ca9cbde90fffec8038f4d4e16fd4046bbd018",
|
||||
"reference": "0e3ca9cbde90fffec8038f4d4e16fd4046bbd018",
|
||||
"url": "https://api.github.com/repos/symfony/debug/zipball/d5a058ff6ecad26b30c1ba452241306ea34c65cc",
|
||||
"reference": "d5a058ff6ecad26b30c1ba452241306ea34c65cc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3403,128 +3182,7 @@
|
||||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-06-26T08:45:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v3.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dependency-injection.git",
|
||||
"reference": "3f115cc3aae4d320b26db05e9531f4e32da29b89"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/3f115cc3aae4d320b26db05e9531f4e32da29b89",
|
||||
"reference": "3f115cc3aae4d320b26db05e9531f4e32da29b89",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"psr/container": "^1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/config": "<3.3.7",
|
||||
"symfony/finder": "<3.3",
|
||||
"symfony/proxy-manager-bridge": "<3.4",
|
||||
"symfony/yaml": "<3.4"
|
||||
},
|
||||
"provide": {
|
||||
"psr/container-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/config": "~3.3|~4.0",
|
||||
"symfony/expression-language": "~2.8|~3.0|~4.0",
|
||||
"symfony/yaml": "~3.4|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/config": "",
|
||||
"symfony/expression-language": "For using expressions in service container configuration",
|
||||
"symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required",
|
||||
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
|
||||
"symfony/yaml": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\DependencyInjection\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony DependencyInjection Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-07-16T13:57:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v3.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
"reference": "8dab220fec8fc904821485326b29a6c670286124"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/8dab220fec8fc904821485326b29a6c670286124",
|
||||
"reference": "8dab220fec8fc904821485326b29a6c670286124",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"symfony/polyfill-ctype": "~1.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Filesystem\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Filesystem Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-07-09T13:25:43+00:00"
|
||||
"time": "2018-07-26T11:19:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
@@ -3583,16 +3241,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v3.4.13",
|
||||
"version": "v3.4.14",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0"
|
||||
"reference": "810af2d35fc72b6cf5c01116806d2b65ccaaf2e2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/c5010cc1692ce1fa328b1fb666961eb3d4a85bb0",
|
||||
"reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/810af2d35fc72b6cf5c01116806d2b65ccaaf2e2",
|
||||
"reference": "810af2d35fc72b6cf5c01116806d2b65ccaaf2e2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3638,7 +3296,7 @@
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-05-03T23:18:14+00:00"
|
||||
"time": "2018-07-26T11:19:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
@@ -3735,9 +3393,7 @@
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
"roave/security-advisories": 20,
|
||||
"ademarre/binary-to-text-php": 20,
|
||||
"pdepend/pdepend": 0,
|
||||
"phpmd/phpmd": 0
|
||||
"ademarre/binary-to-text-php": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
|
||||
@@ -71,5 +71,7 @@ return [
|
||||
->constructor(true),
|
||||
Logger::class => \DI\create(Logger::class)
|
||||
->constructor('syspass'),
|
||||
AccountAclService::class => \DI\autowire(AccountAclService::class)
|
||||
AccountAclService::class => \DI\autowire(AccountAclService::class),
|
||||
\GuzzleHttp\Client::class => \DI\create(GuzzleHttp\Client::class)
|
||||
->constructor(\DI\factory([\SP\Http\Client::class, 'getOptions']))
|
||||
];
|
||||
@@ -31,7 +31,7 @@ use SP\Core\Exceptions\CheckException;
|
||||
*
|
||||
* @package SP\Core
|
||||
*/
|
||||
class PhpExtensionChecker
|
||||
final class PhpExtensionChecker
|
||||
{
|
||||
/**
|
||||
* Array of extensions needed by sysPass.
|
||||
@@ -88,145 +88,164 @@ class PhpExtensionChecker
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkCurlAvailable()
|
||||
{
|
||||
if (!$this->checkIsAvailable('curl')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'curl'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param $extension
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkIsAvailable(string $extension)
|
||||
public function checkCurlAvailable($exception = false)
|
||||
{
|
||||
return in_array(strtolower($extension), $this->available);
|
||||
return $this->checkIsAvailable('curl', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param string $extension
|
||||
* @param bool $exception Throws an exception if the extension is not available
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkLdapAvailable()
|
||||
public function checkIsAvailable(string $extension, $exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('ldap')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'ldap'));
|
||||
$result = in_array(strtolower($extension), $this->available);
|
||||
|
||||
if (!$result && $exception) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, $extension));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkSimpleXmlAvailable()
|
||||
public function checkLdapAvailable($exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('simplexml')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'simplexml'));
|
||||
}
|
||||
return $this->checkIsAvailable('ldap', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkXmlAvailable()
|
||||
public function checkSimpleXmlAvailable($exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('xml')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'xml'));
|
||||
}
|
||||
return $this->checkIsAvailable('simplexml', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkPharAvailable()
|
||||
public function checkXmlAvailable($exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('phar')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'phar'));
|
||||
}
|
||||
return $this->checkIsAvailable('xml', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkJsonAvailable()
|
||||
public function checkPharAvailable($exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('json')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'json'));
|
||||
}
|
||||
return $this->checkIsAvailable('phar', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkPdoAvailable()
|
||||
public function checkJsonAvailable($exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('pdo')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'pdo'));
|
||||
}
|
||||
return $this->checkIsAvailable('json', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkGettextAvailable()
|
||||
public function checkPdoAvailable($exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('gettext')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'gettext'));
|
||||
}
|
||||
return $this->checkIsAvailable('pdo', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkOpenSslAvailable()
|
||||
public function checkGettextAvailable($exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('openssl')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'openssl'));
|
||||
}
|
||||
return $this->checkIsAvailable('gettext', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkGdAvailable()
|
||||
public function checkOpenSslAvailable($exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('gd')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'gd'));
|
||||
}
|
||||
return $this->checkIsAvailable('openssl', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkMbstringAvailable()
|
||||
public function checkGdAvailable($exception = false)
|
||||
{
|
||||
if (!$this->checkIsAvailable('mbstring')) {
|
||||
throw new CheckException(sprintf(self::MSG_NOT_AVAILABLE, 'mbstring'));
|
||||
}
|
||||
return $this->checkIsAvailable('gd', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the extension is installed
|
||||
*
|
||||
* @param bool $exception
|
||||
*
|
||||
* @return bool
|
||||
* @throws CheckException
|
||||
*/
|
||||
public function checkMbstringAvailable($exception = false)
|
||||
{
|
||||
return $this->checkIsAvailable('mbstring', $exception);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,4 +263,16 @@ class PhpExtensionChecker
|
||||
|
||||
logger('Extensions checked', 'INFO');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns missing extensions
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getMissing()
|
||||
{
|
||||
return array_filter(self::EXTENSIONS, function ($k) {
|
||||
return !in_array($k, $this->available);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
}
|
||||
}
|
||||
58
lib/SP/Http/Client.php
Normal file
58
lib/SP/Http/Client.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2018, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* sysPass is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace SP\Http;
|
||||
|
||||
use SP\Config\ConfigData;
|
||||
|
||||
/**
|
||||
* Class Client
|
||||
*
|
||||
* @package SP\Http
|
||||
*/
|
||||
class Client
|
||||
{
|
||||
/**
|
||||
* @param ConfigData $configData
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getOptions(ConfigData $configData)
|
||||
{
|
||||
$options = [
|
||||
'timeout' => 10,
|
||||
'version' => 1.1
|
||||
];
|
||||
|
||||
if ($configData->isProxyEnabled()) {
|
||||
$options['proxy'] = sprintf('tcp://%s:%d', $configData->getProxyServer(), $configData->getProxyPort());
|
||||
|
||||
if (!empty($configData->getProxyUser()) && !empty($configData->getProxyPass())) {
|
||||
$options['auth'] = [$configData->getProxyUser(), $configData->getProxyPass()];
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ use SP\Config\ConfigData;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\Core\Events\EventMessage;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\PhpExtensionChecker;
|
||||
use SP\Services\Service;
|
||||
use SP\Services\ServiceException;
|
||||
use SP\Storage\Database\Database;
|
||||
@@ -47,19 +48,23 @@ final class FileBackupService extends Service
|
||||
/**
|
||||
* @var ConfigData
|
||||
*/
|
||||
protected $configData;
|
||||
private $configData;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $path;
|
||||
private $path;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $backupFileApp;
|
||||
private $backupFileApp;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $backupFileDb;
|
||||
private $backupFileDb;
|
||||
/**
|
||||
* @var PhpExtensionChecker
|
||||
*/
|
||||
private $extensionChecker;
|
||||
|
||||
|
||||
/**
|
||||
@@ -91,13 +96,20 @@ final class FileBackupService extends Service
|
||||
EventMessage::factory()->addDescription(__u('Realizar Backup'))));
|
||||
|
||||
$this->backupTables('*', new FileHandler($this->backupFileDb));
|
||||
$this->backupApp($this->backupFileApp);
|
||||
|
||||
if (!$this->backupApp($this->backupFileApp)
|
||||
&& !$this->backupAppLegacyLinux($this->backupFileApp)
|
||||
) {
|
||||
throw new ServiceException(__u('Error al realizar backup en modo compatibilidad'));
|
||||
}
|
||||
|
||||
$this->configData->setBackupHash($backupUniqueHash);
|
||||
$this->config->saveConfig($this->configData);
|
||||
} catch (ServiceException $e) {
|
||||
throw $e;
|
||||
} catch (\Exception $e) {
|
||||
$this->eventDispatcher->notifyEvent('exception', new Event($e));
|
||||
|
||||
throw new ServiceException(
|
||||
__u('Error al realizar el backup'),
|
||||
SPException::ERROR,
|
||||
@@ -275,27 +287,24 @@ final class FileBackupService extends Service
|
||||
* @param string $backupFile nombre del archivo de backup
|
||||
*
|
||||
* @return bool
|
||||
* @throws ServiceException
|
||||
* @throws \SP\Core\Exceptions\CheckException
|
||||
*/
|
||||
private function backupApp($backupFile)
|
||||
{
|
||||
$this->eventDispatcher->notifyEvent('run.backup.process',
|
||||
new Event($this,
|
||||
EventMessage::factory()->addDescription(__u('Copiando aplicación')))
|
||||
);
|
||||
if (!$this->extensionChecker->checkPharAvailable()) {
|
||||
$this->eventDispatcher->notifyEvent('error',
|
||||
new Event($this, EventMessage::factory()
|
||||
->addDescription(sprintf(__('La extensión \'%s\' no está disponible'), 'phar')))
|
||||
);
|
||||
|
||||
if (!class_exists(\PharData::class)) {
|
||||
if (Checks::checkIsWindows()) {
|
||||
throw new ServiceException(
|
||||
__u('Esta operación sólo es posible en entornos Linux'), ServiceException::INFO);
|
||||
}
|
||||
|
||||
if (!$this->backupAppLegacyLinux($backupFile)) {
|
||||
throw new ServiceException(
|
||||
__u('Error al realizar backup en modo compatibilidad'));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->eventDispatcher->notifyEvent('run.backup.process',
|
||||
new Event($this, EventMessage::factory()
|
||||
->addDescription(__u('Copiando aplicación')))
|
||||
);
|
||||
|
||||
$compressedFile = $backupFile . '.gz';
|
||||
|
||||
if (file_exists($compressedFile)) {
|
||||
@@ -303,12 +312,12 @@ final class FileBackupService extends Service
|
||||
}
|
||||
|
||||
$archive = new \PharData($backupFile);
|
||||
$archive->buildFromDirectory(APP_ROOT, '/^(?!backup).*$/');
|
||||
$archive->buildFromDirectory(APP_ROOT, '/^(?!backup).*$/i');
|
||||
$archive->compress(\Phar::GZ);
|
||||
|
||||
unlink($backupFile);
|
||||
|
||||
return file_exists($backupFile);
|
||||
return file_exists($compressedFile);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -317,9 +326,20 @@ final class FileBackupService extends Service
|
||||
* @param string $backupFile nombre del archivo de backup
|
||||
*
|
||||
* @return int Con el código de salida del comando ejecutado
|
||||
* @throws ServiceException
|
||||
*/
|
||||
private function backupAppLegacyLinux($backupFile)
|
||||
{
|
||||
if (Checks::checkIsWindows()) {
|
||||
throw new ServiceException(
|
||||
__u('Esta operación sólo es posible en entornos Linux'), ServiceException::INFO);
|
||||
}
|
||||
|
||||
$this->eventDispatcher->notifyEvent('run.backup.process',
|
||||
new Event($this, EventMessage::factory()
|
||||
->addDescription(__u('Copiando aplicación')))
|
||||
);
|
||||
|
||||
$compressedFile = $backupFile . '.gz';
|
||||
|
||||
$command = 'tar czf ' . $compressedFile . ' ' . BASE_PATH . ' --exclude "' . $this->path . '" 2>&1';
|
||||
@@ -351,5 +371,6 @@ final class FileBackupService extends Service
|
||||
protected function initialize()
|
||||
{
|
||||
$this->configData = $this->config->getConfigData();
|
||||
$this->extensionChecker = $this->dic->get(PhpExtensionChecker::class);
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ final class Installer extends Service
|
||||
*/
|
||||
const VERSION = [3, 0, 0];
|
||||
const VERSION_TEXT = '3.0-beta';
|
||||
const BUILD = 18073101;
|
||||
const BUILD = 18080201;
|
||||
|
||||
/**
|
||||
* @var DatabaseSetupInterface
|
||||
|
||||
@@ -134,14 +134,14 @@ abstract class Service
|
||||
}
|
||||
|
||||
if (empty($key)) {
|
||||
throw new ServiceException(__u('Error ol obtener la clave maestra del contexto'));
|
||||
throw new ServiceException(__u('Error al obtener la clave maestra del contexto'));
|
||||
}
|
||||
|
||||
return $key;
|
||||
} catch (CryptoException $e) {
|
||||
logger($e->getMessage());
|
||||
|
||||
throw new ServiceException(__u('Error ol obtener la clave maestra del contexto'));
|
||||
throw new ServiceException(__u('Error al obtener la clave maestra del contexto'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<authBasicAutoLoginEnabled>1</authBasicAutoLoginEnabled>
|
||||
<authBasicDomain></authBasicDomain>
|
||||
<authBasicEnabled>1</authBasicEnabled>
|
||||
<backup_hash>46dacd46279cb15e1712dc8bf3430e9e326164d0</backup_hash>
|
||||
<backup_hash>194b7b980763ac87cecdc1b9408494319faf7ed5</backup_hash>
|
||||
<checkUpdates>0</checkUpdates>
|
||||
<checknotices>0</checknotices>
|
||||
<configDate>1533075231</configDate>
|
||||
<configHash>c7d4a323f7208fe105cc90545d9eb3e104fa93ea</configHash>
|
||||
<configDate>1533163223</configDate>
|
||||
<configHash>d5ab2e6e9ba9c408bd7bacabef6d0dae1145e191</configHash>
|
||||
<configSaver></configSaver>
|
||||
<configVersion></configVersion>
|
||||
<databaseVersion></databaseVersion>
|
||||
@@ -32,7 +32,7 @@
|
||||
<dokuwikiUrlBase></dokuwikiUrlBase>
|
||||
<dokuwikiUser></dokuwikiUser>
|
||||
<encryptSession>0</encryptSession>
|
||||
<export_hash>e7e56309b3c6ddaab8d6e85c27b471e14dc3ec0c</export_hash>
|
||||
<export_hash>9e1497c1a9f5085aa5512e6fa2e0089d4a967ca9</export_hash>
|
||||
<filesAllowedExts>
|
||||
<item type="filesAllowedExts">PDF</item>
|
||||
<item type="filesAllowedExts">JPG</item>
|
||||
|
||||
Reference in New Issue
Block a user