[pve-devel] [PATCH v2 common 1/1] API schema: add 'notoken' property

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Nov 25 08:03:19 CET 2019


On November 23, 2019 6:08 pm, Thomas Lamprecht wrote:
> On 11/21/19 3:43 PM, Fabian Grünbichler wrote:
>> to mark API methods which should not be available to clients authenticated using an API token
>> 
>> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
>> ---
>> 
>> Notes:
>>     if applied, any users of this need corresponding versioned depends.
>> 
>>  src/PVE/JSONSchema.pm | 5 +++++
>>  1 file changed, 5 insertions(+)
>> 
>> diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm
>> index 51c3881..ef0f1c9 100644
>> --- a/src/PVE/JSONSchema.pm
>> +++ b/src/PVE/JSONSchema.pm
>> @@ -1294,6 +1294,11 @@ my $method_schema = {
>>  	    description => "Method needs special privileges - only pvedaemon can execute it",
>>  	    optional => 1,
>>          },
>> +	notoken => {
>> +	    type => 'boolean',
>> +	    description => "Method is not available for clients authenticated using an API token.",
>> +	    optional => 1,
>> +	},
> 
> as requested by me and Dominik (IIRC) use something non-negative (heh),
> e.g., 'allowtoken' with default to true.

sorry, seems like I lost track of that one. will include in v3!

> 
>>          download => {
>>              type => 'boolean',
>>  	    description => "Method downloads the file content (filename is the return value of the method).",
>> 
> 
> 
> 




More information about the pve-devel mailing list