Permalink
Browse files

Datasource: This fixes an issue where the tables for different users …

…override each other.
  • Loading branch information...
1 parent 3d8f090 commit 061d4a219896dca9f809b86eff6ed4126898e62f @daschl daschl committed Jul 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 cake/libs/model/datasources/dbo/dbo_oracle.php
@@ -467,7 +467,7 @@ function listSources() {
if ($cache != null) {
return $cache;
}
- $sql = 'SELECT view_name AS name FROM all_views UNION SELECT table_name AS name FROM all_tables';
+ $sql = 'SELECT view_name AS name FROM user_views UNION SELECT table_name AS name FROM user_tables';
if (!$this->execute($sql)) {
return false;

2 comments on commit 061d4a2

Contributor

cdvrooman replied Aug 7, 2012

This change causes an issue where I have been granted access to tables from different schemas and I cannot access them because they are not "mine". Would it be possible to add a configuration toggle where the global or user table namespace could be chosen for the connection at the discretion of the developer?

The other related commit, fb31146, would also have to be added to such a change.

@cdvrooman You can see my commit and pull request at #123 for this. It was not merged (I think the reason was that it was complex and other developers didn't have an Oracle testing environment), but it also supports caching, which the base driver doesn't, and comes with unit tests.

Please sign in to comment.