anklimsk/cakephp-settings-app

为 CakePHP 2.x 应用程序设置提供的 UI

安装: 44

依赖项: 0

建议者: 0

安全: 0

星级: 0

观察者: 1

分支: 0

公开问题: 0

类型:cakephp-plugin

v1.0.7 2019-11-30 18:25 UTC

This package is auto-updated.

Last update: 2024-09-29 04:14:39 UTC


README

Build Status Coverage Status Latest Stable Version License

为 CakePHP 应用程序设置提供的 UI

此插件提供以下功能:

  • CakePHP 应用的基本设置;
  • 创建自定义设置;
    • 定义设置方案;
    • 定义验证设置的规则;
    • 为设置创建 UI。
  • 为 LDAP 服务器上安全组的成员设置具有角色和前缀的用户;
  • 设置发送包含加密用户密码的电子邮件;
  • 获取 LDAP 服务器上安全组成员的电子邮件列表;

安装

  1. 使用 composer 安装插件: composer require anklimsk/cakephp-settings-app

  2. 将以下行添加到文件 app/Config/bootstrap.php 的末尾

    CakePlugin::load('CakeSettingsApp', ['bootstrap' => true, 'routes' => true]);
  3. 获取运行 web 服务器的用户名称,运行命令: ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1.

  4. 设置文件 app/Config/config.php 的所有者,运行命令 chown www-data app/Config/config.php 其中 www-data - web 服务器的用户名。

  5. 添加到文件 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

使用

使用此插件