tamaki.mes.permissions
Helpers for detecting and surfacing permission (access-denied) exceptions thrown by the
system.mes.* Script API when a user lacks a required permission. When a permission-gated MES call
fails, it raises an exception whose message contains MissingPermissionException. The functions in
this package recognise that message, parse out its details, and can show the user an "Access Denied"
popup.
This package defines two module-level constants used by the parsing functions:
exceptionName: the marker string"MissingPermissionException"searched for in exception text.pattern: the regular expression used to extract the username, class, method, and required permissions from the exception message.
Function List
isPermissionException
Returns whether an exception is a permission (access-denied) exception.
extractPermissionExceptionDetails
Parses a permission exception into a dictionary of username, class, method, and required permissions.
extractPermissionExceptionMessage
Returns the raw matched permission-exception message string.
notifyUserIfPermissionException
If the exception is a permission exception, opens the Access Denied popup and returns True.