Commit 0de35bbd authored by Francois Marier's avatar Francois Marier
Browse files

bulkexport: override permission checks in can_view_view

Normally admins are not allowed to view a user's view unless explicitly allowed
to by the user. This is a quick hack to make this possible when it's done as part
of a bulk export.
Signed-off-by: default avatarFrancois Marier <>
parent 01c7d95a
......@@ -27,6 +27,7 @@
define('INTERNAL', 1);
define('ADMIN', 1);
define('BULKEXPORT', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
safe_require('export', 'leap');
......@@ -1512,6 +1512,11 @@ function pieform_template_dir($file, $pluginlocation='') {
function can_view_view($view_id, $user_id=null, $usertoken=null, $mnettoken=null) {
global $USER, $SESSION;
if (defined('BULKEXPORT')) {
return true;
$now = time();
$dbnow = db_format_timestamp($now);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment