English 中文(简体)
Yi框架: 功能控制
原标题:Yii framework : role based access control
  • 时间:2012-01-13 08:45:16
  •  标签:
  • php
  • yii

我正在利用《格罗尔网络应用开发》参考的“快车”框架实施基于出入控制。 我已经执行了每件事情,最多可达189页。

第189页说,可以采用以下方法检查用户是否允许采取某种行动。

If( Yii::app()->user->checkAccess( createIssue )) { //perform needed logic }

但是,这种方法总是向被分配到<><><>>createIssue运行的用户归还错误。

following is the database diagram for RBAC

“enterography

i am linking UserID and role for authassignment table using following command.

au=Yii:app()->auth 经理; au; 辞职(成员1人);

由于你可以看到我的用户表和自发表格没有直接关系。

而我主编。 组合文件夹

这些都是我们迄今所做的所有工作,如果在此没有任何东西,任何机构都可以与我分享你们的知识。 事先得到任何帮助。

最佳回答

Come on, man! Of course there must be a direct relationship between users and assigments. In the following piece of code:

$auth=Yii::app()->authManager; $auth->assign( member ,1)

成员属于自闭室,1人担任该角色的使用者。 “救助”表中的“使用”必须注明用户表。

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签