定制 oat-sa/tao-core 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oat-sa/tao-core

Composer 安装命令:

composer require oat-sa/tao-core

包简介

TAO core extension

README 文档

README

codecov

Webhooks

Description

Webhooks allow you to send a request to remote server based on triggered event

How to use it

Register event webhook.

use command \oat\tao\scripts\tools\RegisterEventWebhook to register events that are implementing \oat\tao\model\webhooks\configEntity\WebhookInterface interface.

i.e:

$ php index.php 'oat\tao\scripts\tools\RegisterEventWebhook'
    \ -u "https://example.com"
    \ -m "POST"
    \ -e "<<Class FQN>>"

Check ACL Permissions

In order to check ACL permissions, you can use the PermissionChecker:

$permissionChecker = $this->getServiceLocator()->get(oat\tao\model\accessControl\PermissionChecker::class);

$permissionChecker->hasWriteAccess('resourceId');
$permissionChecker->hasReadAccess('resourceId');
$permissionChecker->hasGrantAccess('resourceId');

Important: It takes into consideration the current user in the session, if no user is provided.

Roles Access (rules and action permissions)

Description

Script allow you to apply (add)/revoke (remove) list of rules and/or permissions to a specific roles and actions.

How to use it

Execute the following command to apply (add) new rules/permissions:

$ php index.php 'oat\tao\scripts\tools\accessControl\SetRolesAccess' \
--config [config.json|json_string]

If you want to revoke (remove) them, add --revoke flag:

$ php index.php 'oat\tao\scripts\tools\accessControl\SetRolesAccess' \
--revoke \
--config [config.json|json_string]

Config example

{
  "rules": {
    "role": [
      {
        "ext": "extensionIdentifier",
        "mod": "actionControllerName",
        "act": "actionMethodName"
      }
    ]
  },
  "permissions": {
    "controller": {
      "action": {
        "rule1": "READ",
        "rule2": "WRITE"
      }
    }
  }
}

Environment variables

Here you can find the environment variables including feature flags

Variable Description Default value
FEATURE_FLAG_LISTS_DEPENDENCY_ENABLED Enable Remote Lists Dependency feature -
FEATURE_FLAG_ADVANCED_SEARCH_DISABLED Disable advanced search feature, if set to 1 -
FEATURE_FLAG_STATISTIC_METADATA_IMPORT Enable statistics metadata import -
FEATURE_FLAG_CKEDITOR_SOURCEDIALOG Enable source editing for ckeditor false
FEATURE_FLAG_SOLAR_DESIGN_ENABLED Activate the Solar Design mode -
GOOGLE_APPLICATION_CREDENTIALS Path to GCP credentials path -
DATA_STORE_STATISTIC_PUB_SUB_TOPIC Topic name for statistic metadata Pub/Sub -
REDIRECT_AFTER_LOGOUT_URL Allows to configure the redirect after logout via environment variable. The fallback is the configured redirect on urlroute.conf.php -
PORTAL_URL The Portal url used on the back button of Portal theme -
FEATURE_FLAG_TRANSLATION_ENABLED Enable access to items/tests translations feature -
TAO_ALLOWED_TRANSLATION_LOCALES Comma separated List of locales available for translations / authoring in the UI. If none provided, all are allowed -
COOKIE_POLICY_CONFIG JSON with CookiePolicy config. Example: {"privacyPolicyUrl":"https://...","cookiePolicyUrl":"https://..."} -
TAO_ID_GENERATOR_MAX_RETRIES Maximum number of retry attempts for unique ID generation on collision 10
TAO_ID_GENERATOR_SHOULD_CHECK_STATEMENTS Enable statement checks during ID generation (set to 1 to enable) 0
TAO_ID_GENERATOR_ID_START Starting value for unique ID generation 1
FEATURE_FLAG_TAO_DUAL_PREVIEW_ENABLED Enables buttons to run secondary registered previewer 1

Routing

Check more information about actions/controllers and routing here

Observer implementations

Check the current observer implementations here

Data Policy Orchestrator handlers

Check the current Data Policy Orchestrator handlers doc here

oat-sa/tao-core 适用场景与选型建议

oat-sa/tao-core 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 145.3k 次下载、GitHub Stars 达 66, 最近一次更新时间为 2014 年 07 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「OAT」 「TAO」 「computer-based-assessment」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 oat-sa/tao-core 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 oat-sa/tao-core 我们能提供哪些服务?
定制开发 / 二次开发

基于 oat-sa/tao-core 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 145.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 66
  • 点击次数: 20
  • 依赖项目数: 64
  • 推荐数: 0

GitHub 信息

  • Stars: 66
  • Watchers: 42
  • Forks: 36
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2014-07-22