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

No support for schema names in itemTable, itemChildTable, assignmentTable and rightsTable. #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an $auth object and set $auth->itemTable = 'otherschema.AuthItem';
2. Try to create an auth item.

What is the expected output? What do you see instead?
Rights should do a proper insert to the database using provided table and 
schema name.

What version of the product are you using? On what operating system?
r140

Please provide any additional information below.
In components/RDbAuthManager.php on line 224 a query should be build using 
query builder, not written directly:
$rows = $this->db->createCommand()
->select(array('name','type','description','bizrule','data'))
->from($this->itemTable)
->join($this->itemChildTable, 'name=child')
->where($condition)->queryAll();

Probably rest of queries should be rewritten to use query builder. This 
properly quotes column names. See issue 56.

Original issue reported on code.google.com by janek....@gmail.com on 10 Jan 2012 at 7:27