i 在我的面包所项目中使用 au网
我在用户Mysql表格中添加类型
(a) 行政、客户
i 有必要将行政工作转向CP网页,客户可进入其简介网页,而且只能使用一名主计长。
不使用《维也纳条约法公约》或任何其他与此相关的文书
i 在我的面包所项目中使用 au网
我在用户Mysql表格中添加类型
(a) 行政、客户
i 有必要将行政工作转向CP网页,客户可进入其简介网页,而且只能使用一名主计长。
不使用《维也纳条约法公约》或任何其他与此相关的文书
d 我建议利用你在控制器或模型中能够增加的教益功能。 Set the AuthComponent:authorize ={ Controller dell } to choose which You想要使用。
接着,你写了“Authorized”(Authorized)”功能,即每份行动在 au/not的回报。 如果你愿意,你也可以做一些逐级检查。
现在,如果你只是想把一个行政改用在标识/名称的正确网页上,那么,你就可以在“Filter”方法上添加代码(或者在某个特定的控制器中,或者在“控制器”。 在这一点上,仅仅检查一下,看看看看看看看看看看看看该信规定的行政价值是否与用户的行政价值相同(将由AusthComponent在届会数据中储存,可查得的是该数字;Auth->User())。 然后,适当前往行政/非行政区。
isAuthorized() is the best choice. i would recommend to separate the users from their groups in the database, so User habtm Group... but It is not a problem if user belongs to one and only one group I do not recommend ACL for non record-level-based permissions system
只注意一点,但除非最近发生了一些变化 PHP不支持ENUM类。
Your best bet is a Group model ( groups mysql table ) and a group_id field on the users table. Then you can $hasOne = array( Group ); in your User model.
从那以后,你可以通过“CakePHP Auth”用户小组的简单直观搜索,跟踪Austh部件的一组出入控制辅导。
In CakePHP, it seems like a lot of functions can take their arguments as nested, multidimensional arrays, or as dotted strings: $this->MyModel->contain(array( Something , Something.Else , ...
I ve got a cakephp app that I m trying to get to serve up the Pages::404 function (and corresponding view) whenever Cake encounters any error (missing controller, action, etc). What s the best way to ...
I am going to be builiding a site like ebay - with all the features of ebay. Please note my payment method is limited to paypal. What would be the best PHP framework to use to build this quickly, ...
I am wondering if there is a way to specify the date format in the forms created using CakePHP s $form->inputs(); Please note that this is not the individual $form->input() but instead $form->inputs() ...
I am writing a CakePHP 1.2 app. I have a list of people that I want the user to be able to filter on different fields. For each filterable field, I have a drop down list. Choose the filter ...
In my CakePHP app, I m pulling in the results of a table called Timesheets . This table has an athlete_id and a few split times for a race. I need to do some calculations on one athlete s times ...
How would I represent the following in a CakePHP model? Product ======= product_id .... Cart ==== cart_id .... Carts_Products ============== cart_id product_id quantity
I am a beginning Cake user and trying to do some work on an already existing application. Running into a problem when I create a new controller. I have created StoreController and when I try to call ...