An auth example use please
Posted: Wed Sep 07, 2016 9:22 pm
Can You please show me how to use the auth example ?Thanks
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)
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)