Whether the actions pass or not depends on the current user, including
the results of several hooks and whether the current user is blocked.
Also, we can clean up the test for public inprops slightly.
Change-Id: I7e2610dd609c52711355b640778f795520a4ff8c
}
public function getCacheMode( $params ) {
+ // Other props depend on something about the current user
$publicProps = array(
'protection',
'talkid',
'preload',
'displaytitle',
);
- if ( !is_null( $params['prop'] ) ) {
- foreach ( $params['prop'] as $prop ) {
- if ( !in_array( $prop, $publicProps ) ) {
- return 'private';
- }
- }
+ if ( array_diff( (array)$params['prop'], $publicProps ) ) {
+ return 'private';
}
+
+ // testactions also depends on the current user
+ if ( $params['testactions'] ) {
+ return 'private';
+ }
+
if ( !is_null( $params['token'] ) ) {
return 'private';
}