所有網頁 圖片 影片 地圖 新聞 網誌搜尋 Gmail 更多 »
最近造訪的群組 | 說明 | 登入
Google 網上論壇首頁
Best Way to Organize Controllers for Multiple Roles
目前本群組有太多主題設為優先顯示。要優先顯示這個主題,請將其他主題的這個選項取消。
在處理您的要求時發生錯誤。請再試一次。
標幟
  3 個訊息 - 全部摺疊  -  將全文翻譯為 已翻譯 (查看所有原文)
您要留言的群組是 Usenet 群組。在此群組留言,網際網路上的任何使用者將可以看到您的電郵地址。
您的回覆郵件尚未寄出。
您已成功留言
 
寄件人:
收件人:
副本:
後續追蹤對象:
新增副本 | 新增後續追蹤對象 | 編輯主旨
主旨:
驗證:
為了確認,請輸入您在以下圖片中看到的字元,或輸入您按下存取圖示時所聽到的號碼。 注意聽並輸入您聽到的號碼
 
lauraw  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 11月5日, 下午11時45分
寄件人: lauraw <lauraweind...@hotmail.com>
日期: Thu, 5 Nov 2009 07:45:01 -0800 (PST)
當地時間: 2009年11月5日(星期四) 下午11時45分
主旨: Best Way to Organize Controllers for Multiple Roles
I'm trying to figure out the best way to organize controllers based on
user roles and could use some advice. I know there are experienced
people here who have had to deal with this already :-).

I have controller folders setup as:

member/
manager/
admin/

They all deal with products and I don't want to have one
ProductController at the controllers/ level that has all the functions
(view a product, add a product, delete a product). This is the way I'd
like to set it up:

member/product_controller - view()
manager/product_controller - add()
admin/product_controller - delete()

What is the best way to accomplish this division of controller
functionality? I know that I can modify the paths for controllers in
bootstrap.php, but if I have the same controller under multiple
locations, which one will cake find? The first in the list I assume?
The other solution I was thinking of is to name the controllers
differently, but is this the best way to do it?

mem_product_controller
mgr_product_controller
adm_product_controller

I'm new to CakePHP ... I'm not sure if this is doable with cake's MVC
naming conventions.

Thanks for your help!


    回覆    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。
Miles J  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 11月6日, 上午3時11分
寄件人: Miles J <mileswjohn...@gmail.com>
日期: Thu, 5 Nov 2009 11:11:38 -0800 (PST)
當地時間: 2009年11月6日(星期五) 上午3時11分
主旨: Re: Best Way to Organize Controllers for Multiple Roles
You can't separate controllers into folders like you can in
CodeIgniter/Zend. You would have to use prefixes, which is only
present in 1.3, which is still alpha.

Or you can create separate plugins for each member/manager/admin, but
that becomes too much.

Or you just use 1 controller, and use an ACL type system that
determines what they can and cannot do.

On Nov 5, 7:45 am, lauraw <lauraweind...@hotmail.com> wrote:


    回覆    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。
lauraw  
檢視個人資料   翻譯為 已翻譯 (查看原文)
 更多選項 11月6日, 上午6時29分
寄件人: lauraw <lauraweind...@hotmail.com>
日期: Thu, 5 Nov 2009 14:29:20 -0800 (PST)
當地時間: 2009年11月6日(星期五) 上午6時29分
主旨: Re: Best Way to Organize Controllers for Multiple Roles
I'm going to be implemented/learning ACL as part of this project so
I'll go that route. Thanks, Miles!

    回覆    回覆作者    轉寄  
您必須先登入才能張貼訊息。
若要張貼訊息,您必須先加入此群組
請在留言之前更新您訂閱設定網頁上的暱稱。
您沒有留言所需的權限。
無其他留言
« 返回討論主題 « 較新的主題     較舊的主題 »

建立群組 - Google 網上論壇 - Google 首頁 - 服務條款 - 隱私權政策
©2009 Google