minimize the numer of queries to database while checking permissions

http://dev.kohanaframework.org/issues/4326