* pyupgrade
* various new codemods
* manual removal of Py2/3 compat imports
* manual adjustment of docs, examples, tests
* to_str is now the new to_unicode, deprecated
redirection to to_bytes has been removed
* to_native_str has been redirected to point to
to_str
* to_unicode has been redirected to point to
to_str
* atomic_write refactored to use
NamedTemporaryDirectory
* various other fixes/refactorings all over the
place
21 lines
561 B
Python
21 lines
561 B
Python
def plugin_permissions(components):
|
|
return [
|
|
{
|
|
"name": "fancy permission",
|
|
"description": "My Fancy new Permission",
|
|
"roles": ["fancy"],
|
|
},
|
|
{
|
|
"name": "fancy permission with two roles",
|
|
"description": "My Fancy new Permission with two roles",
|
|
"roles": ["fancy1", "fancy2"],
|
|
},
|
|
]
|
|
|
|
|
|
__plugin_name__ = "Permissions Plugin"
|
|
__plugin_description__ = "Test permissions plugin"
|
|
__plugin_hooks__ = {
|
|
"octoprint.access.permissions": plugin_permissions,
|
|
}
|