承接 rmt/authorization-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

rmt/authorization-bundle

Composer 安装命令:

composer require rmt/authorization-bundle

包简介

Bundle used for exporting access controls for entities and a custom voter to use with redis for accessing entities

README 文档

README

Installation

composer require rmt/authorization-bundle

Requirements

  • php ^7.1.3
  • Symfony Framework
  • Symfony Bundle
  • Symfony Finder
  • Symfony Console
  • Api Platform
  • Predis

Usage

To implement authorization for entities it is required to implement the SecuredInterface for the Entities that need Authorization.

Image description

If the entity implements the SecuredInterface it is only needed to add the is_granted attribute to @ApiResource annotation. Not all operations are needed for the authorization to work.

Image description

As you can see from the previous screenshot the collection operation POST instead of security uses security_post_denormalize, that is because in case of a POST request the data firstly needs to be persisted in doctrine and only afterwards we can check for authorization. That is a very important thing to keep in mind, if that operation will use just security no one will be able to POST any resources.

Accepted Attributes

The only accepted attributes are READ , WRITE, DELETE , any other attribute used will trigger an AccessDeniedException!

Things to keep in mind

  • The script will be set to only run when a deployment will run
  • The users access rights will come from redis

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固