Properly handle changing and removing permissions

This commit is contained in:
boatbomber 2023-09-04 08:46:14 -07:00
parent 955b143ced
commit d1d70521a3
3 changed files with 73 additions and 23 deletions

View file

@ -851,17 +851,19 @@ function App:render()
end,
onEdit = function(plugin, source, meta, apiMap)
local name = meta.Name .. if meta.Creator then " by " .. meta.Creator else ""
local apiList = {}
for api in apiMap do
table.insert(apiList, api)
end
self:requestPermission(
local response = self:requestPermission(
plugin,
source,
meta.Name .. if meta.Creator then " by " .. meta.Creator else "",
name,
apiList,
apiMap
)
self.headlessAPI:_setPermissions(source, name, response)
end,
}),