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
1 changed files with 3 additions and 2 deletions

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
});
};