1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-07 06:14:44 +00:00

createBag should optionally set access control data

This commit is contained in:
Jeremy Ruston 2024-02-23 09:26:45 +00:00
parent 3ad87df154
commit 2361880c45

View File

@ -172,7 +172,8 @@ SqlTiddlerDatabase.prototype.listBags = function() {
return rows; return rows;
}; };
SqlTiddlerDatabase.prototype.createBag = function(bagname,description) { SqlTiddlerDatabase.prototype.createBag = function(bagname,description,accesscontrol) {
accesscontrol = accesscontrol || "";
// Run the queries // Run the queries
this.runStatement(` this.runStatement(`
INSERT OR IGNORE INTO bags (bag_name, accesscontrol, description) INSERT OR IGNORE INTO bags (bag_name, accesscontrol, description)
@ -187,7 +188,7 @@ SqlTiddlerDatabase.prototype.createBag = function(bagname,description) {
WHERE bag_name = $bag_name WHERE bag_name = $bag_name
`,{ `,{
$bag_name: bagname, $bag_name: bagname,
$accesscontrol: "[some access control stuff]", $accesscontrol: accesscontrol,
$description: description $description: description
}); });
}; };