F diff --git a/loggedin.js b/loggedin.js --- a/loggedin.js +++ b/loggedin.js// A FileView is an entry inside the explorer windowclass FileView {- constructor(filename, mimetype, is_directory, write_permissions) {+ constructor(filename, visuals, mimetype, is_directory, write_permissions) {this.filename = filename;- this.visuals = null; // The DOM object with the icon and the filenam text+ this.visuals = visuals; // The DOM object with the icon and the filenam textthis.mimetype = mimetype;this.is_directory = is_directory;this.write_permissions = write_permissions;files = [];var json = JSON.parse(xhr.responseText);- console.log(json);if (!json)return;// Create the FileViews from the json responsefor (const f of json) {- var view = new FileView(f.name,- f.mimetype,- f.is_directory && f.is_directory != "0",- f.can_edit && f.can_edit != "0");+ var view = new FileView(f.name, null, f.mimetype, f.is_directory && f.is_directory != "0", true);files.push(view);}F diff --git a/php/database.php b/php/database.php --- a/php/database.php +++ b/php/database.phpnodes.code as code,nodes.type as mimetype,node_access.can_view as can_view,- node_access.can_edit as can_edit+ node_access.can_view as can_edditfrom node_linksinner join nodes onnodes.node_id=node_links.node_idF diff --git a/php/readfile.php b/php/readfile.php --- a/php/readfile.php +++ b/php/readfile.phpexit(0);}- $contents_of_dir = $database->get_links_of($dir);+ $contents_of_dir = $database->get_links_of($dir,$user->user_id);$file_node = null;foreach ($contents_of_dir as $c) {