anklimsk / cakephp-settings-app
为 CakePHP 2.x 应用程序设置提供的 UI
v1.0.7
2019-11-30 18:25 UTC
Requires
- php: >=5.4
- anklimsk/cakephp-config-plugin: ^1.0.0
- anklimsk/cakephp-extended-test: ^1.0.0
- anklimsk/cakephp2-theme: ^1.0.0
- composer/installers: ^1.5.0
README
为 CakePHP 应用程序设置提供的 UI
此插件提供以下功能:
- CakePHP 应用的基本设置;
- 创建自定义设置;
- 定义设置方案;
- 定义验证设置的规则;
- 为设置创建 UI。
- 为 LDAP 服务器上安全组的成员设置具有角色和前缀的用户;
- 设置发送包含加密用户密码的电子邮件;
- 获取 LDAP 服务器上安全组成员的电子邮件列表;
安装
-
使用 composer 安装插件:
composer require anklimsk/cakephp-settings-app
-
将以下行添加到文件
app/Config/bootstrap.php
的末尾CakePlugin::load('CakeSettingsApp', ['bootstrap' => true, 'routes' => true]);
-
获取运行 web 服务器的用户名称,运行命令:
ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1
. -
设置文件
app/Config/config.php
的所有者,运行命令chown www-data app/Config/config.php
其中www-data
- web 服务器的用户名。 -
添加到文件
app/Config/core.php
/** * A random numeric string (digits only) used to encrypt/decrypt strings. */ Configure::write('Security.key', '9b8964f94127f5b843c67e8c89479e4f2cfac2b182c72dc0691cc384c438f9ca'); /** * Set Security.useOpenSsl to use OpenSSL instead of the deprecated mcrpyt extension. */ Configure::write('Security.useOpenSsl', true);
请参阅 https://book.cakephp.com.cn/2.0/en/core-utility-libraries/security.html#Security::encrypt