As a Roblox developer, it is currently too hard to properly script around plugin permissions.
This is due to a lack of methods to check the permissions of a plugin. Apps on both Apple and Android allow this on a developer level, which both implement their own request and check methods for various permissions.
Right now, to invoke the HttpService requests to URLs and Script injection prompts, you have to hackily “probe” the permission system by either dropping in and removing a script, or sending a HTTP request to that URL.
local HttpService = game:GetService("HttpService")
local function tryProbeUrlPermission(url)
local s = pcall(HttpService.RequestAsync, url)
-- this can fail in other ways for example; an invalid url, no connection etc.
-- an explicit invokation prevents this hacky workaround
return s
end
It would be much cleaner if I could just check and/or request the prompt at startup on plugin. The prompt request method should only work if permissions have not been requested beforehand
plugin:RequestPermission(Enum.PermissionType.HttpUrl, "https://www.google.com")
plugin:RequestPermission(Enum.PermissionType.ScriptInjection)
It would also be nice if debugging plugin permissions was possible on local plugins, but thats for a different post. The easiest method is to just unlock PermissionService:GetPermissions
and then I can script around that, however, obtaining the ID of a plugin is it’s own rabbit hole that doesn’t make this the easiest method over just mounting two methods onto a plugin (eg RequestPermission
and CheckPermission
)
If Roblox is able to address this issue, it would improve my development experience because I’d be able to request and check permissions on my own behalf without using hacky workarounds that probe the system