jmcneese / permissionable

A CakePHP 1.3 plugin that provides UNIX-like row-level permissions for model data.
http://jmcneese.wordpress.com/2010/01/28/rmac-is-dead-long-live-rmac/
MIT License
50 stars 8 forks source link

Issue #6 - "GROUP BY" warnings on MSSQL from $this->paginate() #13

Closed andrewmcc closed 13 years ago

andrewmcc commented 13 years ago

Hi - This commit fixes issue #6. On MSSQL (and I guess on databases other than MySQL...), any call to a SQL aggregate function will raise a warning and fail. This change detects when a query type is an aggregate function and prevents Permissionable adding the PermissionBit.* columns to the queryData fields.