Yii Framework Forum: Yii SRBAC中的bizrule 應該如何使用 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii SRBAC中的bizrule 應該如何使用 Rate Topic: -----

#1 User is offline   wlkmf 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 11-January 14

Posted 15 May 2015 - 04:50 AM

已經安裝好srbac。現時有一個問題是:如果有一筆記錄是user001建立,那麼我想只能user001才可以更新或者刪除這一筆記錄,請問這個要如何實現,是不是要用bizrule,我試過在bizrule輸入 "return Yii::app()->user->id==$params["record"]->username;" 系統就顯示 Error:403 '你無權運行'。網上查的很久,可是好像很少人有詳細的解答。如果不用bizrule,還有甚麼辦法嗎? 謝謝
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users