An auth example use please
An auth example use please
Can You please show me how to use the auth example ?Thanks
Re: An auth example use please
http://wiki.sourcepython.com/general/config-auth.html
http://wiki.sourcepython.com/developing ... /auth.html
The command API also utilizes the auth API.
Example:
So, you need the permission "math.add" to execute the command "!add".
http://wiki.sourcepython.com/developing ... /auth.html
The command API also utilizes the auth API.
Example:
Syntax: Select all
from commands.typed import TypedSayCommand
@TypedSayCommand('!add', 'math.add')
def on_add(command_info, x:float, y:float):
print('Result:', x + y)
Re: An auth example use please
Ayuto wrote:http://wiki.sourcepython.com/general/config-auth.html
http://wiki.sourcepython.com/developing ... /auth.html
The command API also utilizes the auth API.
Example:So, you need the permission "math.add" to execute the command "!add".Syntax: Select all
from commands.typed import TypedSayCommand
@TypedSayCommand('!add', 'math.add')
def on_add(command_info, x:float, y:float):
print('Result:', x + y)
Having myself as an admin in the json file, how can I use it? I mean, with Python and auth
Re: An auth example use please
Check the second link in my post. That describes how to check, grant and remove permissions.
You might also want to take a look at the auth module itself:
http://wiki.sourcepython.com/developing ... th.manager
You might also want to take a look at the auth module itself:
http://wiki.sourcepython.com/developing ... th.manager
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 88 guests