onix-systems-php/hyperf-policy 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

onix-systems-php/hyperf-policy

最新稳定版本:v1.2.0

Composer 安装命令:

composer require onix-systems-php/hyperf-policy

包简介

Policy library for hyperf

README 文档

README

Uses Symfony-like voters to check permissions

Install:

composer require onix-systems-php/hyperf-policy

To make it works, you need:

  1. create policy class based on OnixSystemsPHP\HyperfPolicy\Policy\AbstractPolicy

  2. add OnixSystemsPHP\HyperfPolicy\Annotation\Policy annotation to the policy and setup it's priority (higher number executes first)

  3. specify what classes\objects and actions your policy will work with

  4. specify vote logic and return one of the values:

    1. PolicyVote::ACCESS_DENIED - stop execution and throw exception specified in getException method
    2. PolicyVote::ACCESS_GRANTED - allow current action and skip all following policies
    3. PolicyVote::ACCESS_ABSTAIN - go to next policy, allow action if no policies left to check
  5. create data specifier class based on OnixSystemsPHP\HyperfPolicy\Policy\AbstractDataSpecifier

  6. add OnixSystemsPHP\HyperfPolicy\Annotation\DataSpecifier annotation to the specifier and setup it's priority (higher number executes first)

  7. specify what repositories and actions your specifier will work with

统计信息

  • 总下载量: 2.49k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固