日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

FOSCommentBundle功能包:基于ACL安全添加角色

發(fā)布時間:2024/4/17 编程问答 49 豆豆
生活随笔 收集整理的這篇文章主要介紹了 FOSCommentBundle功能包:基于ACL安全添加角色 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

注意:

This bundle ships with support different security setups. You can also have a look at?Adding Symfony2's built in ACL security.

本功能包支持不同的安全設置。您也可以查看添加Symfony2的內建ACL安全

CommentBundle also provides the ability to configure permissions based on the roles a specific user has. See the configuration example below for how to customise the default roles used for permissions.

CommentBundle也可以基于某個特定用戶角色來配置權限。參見下面的配置示例,看看如何使用缺省的角色來自定義權限。


To configure Role based security override the Acl services:

要配置基于角色的安全需要覆蓋ACL服務:

1 2 3 4 5 6 7 8 9 10 11 12 # app/config/config.yml fos_comment: ????acl:?true ????service: ????????acl: ????????????thread:? fos_comment.acl.thread.roles ????????????comment: fos_comment.acl.comment.roles ????????????vote:??? fos_comment.acl.vote.roles ????????manager: ????????????thread:? fos_comment.manager.thread.acl ????????????comment: fos_comment.manager.comment.acl ????????????vote:??? fos_comment.manager.vote.acl

To change the roles required for specific actions, modify the?acl_roles?configuration key:

要為特定操作改變要求的角色,需要修改?acl_roles配置項:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 # app/config/config.yml fos_comment: ????acl_roles: ????????comment: ????????????create: IS_AUTHENTICATED_ANONYMOUSLY ????????????view: IS_AUTHENTICATED_ANONYMOUSLY ????????????edit: ROLE_ADMIN ????????????delete: ROLE_ADMIN ????????thread: ????????????create: IS_AUTHENTICATED_ANONYMOUSLY ????????????view: IS_AUTHENTICATED_ANONYMOUSLY ????????????edit: ROLE_ADMIN ????????????delete: ROLE_ADMIN ????????vote: ????????????create: IS_AUTHENTICATED_ANONYMOUSLY ????????????view: IS_AUTHENTICATED_ANONYMOUSLY ????????????edit: ROLE_ADMIN ????????????delete: ROLE_ADMIN

That is it!

Return to the index.

返回到指南索引頁。



本文轉自 firehare 51CTO博客,原文鏈接:http://blog.51cto.com/firehare/1258402,如需轉載請自行聯(lián)系原作者

總結

以上是生活随笔為你收集整理的FOSCommentBundle功能包:基于ACL安全添加角色的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。