我想对单一被搁置的申请作多个记录。
我有5个A、B、C、D、E和4类用户(P、Q、R、S),包括匿名用户。 本节有小节。 A、B、C节要求登录。 D节和E节可由所有类型的用户使用,但有一些行动可以由特定类型的用户采取。
P只能记录A,Q可以登录到B,R可以登录到C。
请建议我应使用哪些目录结构,我应如何使用多个标识。
增 编
我想对单一被搁置的申请作多个记录。
我有5个A、B、C、D、E和4类用户(P、Q、R、S),包括匿名用户。 本节有小节。 A、B、C节要求登录。 D节和E节可由所有类型的用户使用,但有一些行动可以由特定类型的用户采取。
P只能记录A,Q可以登录到B,R可以登录到C。
请建议我应使用哪些目录结构,我应如何使用多个标识。
增 编
名录结构与准入权无关。 您的全部应用可以是单一控制器,能够发挥你们的作用和权利概念,但不会是单条码。
如果你不使用anna大麻的话(不问) 你们可以通过实施一个简单的概念来解决这一问题:
create an application module for each of your "sections" including a PublicController in each application which will be accessible by anyone later. then you should implement a front controller plugin which could look like the folloing
public function preDispatch()
{
$identity = Zend_Auth::getInstance()->getIdentity();
$module = $this->getRequest()->getModuleName();
$controller = $this->getRequest()->getControllerName();
if($controller == public ) {
return;
}
switch ($identity->role) {
case A :
if ($module != P ) {
$this->myNotAuthorized();
}
break;
// cases for other roles/modules
}
}
You are likely looking for a Role based Access Control List.
Zend Framework offers this through Zend_Acl
.
另见:
如果你不希望执行,你也可以这样做。
使用会议变量和核对模块接入。
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 ...
<?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 = ...
I found this script online that creates a thumbnail out of a image but the thumbnail image is created with poor quality how can I improve the quality of the image. And is there a better way to create ...
如何确认来自正确来源的数字。
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 ...
I wonder there is a way to post a message to a facebook business page with cURL? thanks
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? 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 ...