Yii Framework Forum: srbac checkAccess - Yii Framework Forum

Jump to content

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

srbac checkAccess checking access in case sensitive path Rate Topic: -----

#1 User is offline   ignis 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 27-April 10
  • Location:Lithuania - Vilnius

Posted 28 April 2010 - 06:53 AM

Hi,

I have a problem if it's still a problem.

When I configure my url parameters to by lower case and srbac inserts actions in case sensitive way, for example, itemRegisterAdmin

So if I check that my url must by lower case, than Yii::base function checkAccess has lower cased action itemregisteradmin and selects from database srbac saved action itemRegisterAdmin, than it compares and the rezult is 'itemregisteradmin' === 'itemRegisterAdmin' and checkAccess function returns false.

So in this way I suggest to rewrite checkAcces function in secont Yii realize and for solving this problem, it can be rewriten in srbac module.
0

#2 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 28 April 2010 - 10:56 PM

Which are the steps to duplicate this issue?
Could you put a echo $access; on line 40 of SBaseController and see the name of the action to checkAccess?
Is it lowercase?
0

#3 User is offline   ignis 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 27-April 10
  • Location:Lithuania - Vilnius

Posted 04 May 2010 - 03:03 AM

Yes, it's lower cased but action value taken from srbac one of tables is case sensitive 'itemsControllerAdmin'.

So, the aplication returns lower case string and checks with srbac table values wich are case sensitive.
0

#4 User is offline   ignis 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 27-April 10
  • Location:Lithuania - Vilnius

Posted 04 May 2010 - 03:08 AM

As I see, You fixed this one in new srbac realize :

"If checking db fails , check for lower-upper case issues and display a message"

I'll check this one realize. :)
0

#5 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 04 May 2010 - 04:46 AM

View Postignis, on 04 May 2010 - 03:08 AM, said:

As I see, You fixed this one in new srbac realize :

"If checking db fails , check for lower-upper case issues and display a message"

I'll check this one realize. :)

No this, is for checking authmanager table names
0

#6 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 05 May 2010 - 01:31 AM

I can't duplicate this.
Could you provide the name of the controller and the name of the action function?
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