1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 12:07:19 +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;
};
SqlTiddlerDatabase.prototype.createBag = function(bagname,description) {
SqlTiddlerDatabase.prototype.createBag = function(bagname,description,accesscontrol) {
accesscontrol = accesscontrol || "";
// Run the queries
this.runStatement(`
INSERT OR IGNORE INTO bags (bag_name, accesscontrol, description)
@ -187,7 +188,7 @@ SqlTiddlerDatabase.prototype.createBag = function(bagname,description) {
WHERE bag_name = $bag_name
`,{
$bag_name: bagname,
$accesscontrol: "[some access control stuff]",
$accesscontrol: accesscontrol,
$description: description
});
};