crisu83 / yii-rights

Automatically exported from code.google.com/p/yii-rights
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

getSuperusers from wrong Column #62

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. make "user" table with "name" as column.
2. when enter rights you must get "You are not authorized to perform this 
action." error.

What is the expected output? What do you see instead?
access rights module.

What version of the product are you using? On what operating system?
Yii lastest version on Ubuntu 10.04

Please provide any additional information below.
The problem is in line 300 of RAuthorizer. This list should get username as 
define from 'userNameColumn' config options. not from "name" column.

Original issue reported on code.google.com by oat...@gmail.com on 22 Sep 2011 at 9:05

GoogleCodeExporter commented 9 years ago
yes, i noted this problem as well.

Original comment by dr.tring...@gmail.com on 18 Apr 2012 at 3:47

GoogleCodeExporter commented 9 years ago
Recommend (starting at line 297:

$userNameCol = Rights::module()->userNameColumn

$superusers = array();
foreach( $users as $user )
  $superusers[] = $user->$userNameCol;

Original comment by dr.tring...@gmail.com on 18 Apr 2012 at 3:55