+
+ $rightname = [ $rightname ] unless ref($rightname);
+
+ #some caching of ACL requests for low-hanging fruit perf improvement
+ #since we get a new $CurrentUser object each page view there shouldn't be any
+ #issues with stickiness
+ if ( $self->{_ACLcache} ) {
+
+ return grep $self->{_ACLcache}{$_}, @$rightname
+ unless grep !exists($self->{_ACLcache}{$_}), @$rightname;
+
+ } else {
+ $self->{_ACLcache} = {};
+ }
+
+ my $has_right = ' ( '. join(' OR ',
+ map { 'rightname = '. dbh->quote($_) }
+ @$rightname
+ ).
+ ' ) ';
+