mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-06 19:45:20 +01:00
fix(API): scopes were used illegally
Which caused a compile error. This was fixed by assuring the code uses the same function to determine whether or not scopes are present per method. [skip ci]
This commit is contained in:
@@ -2794,7 +2794,6 @@ impl<'a, C, A> StreamingVariantStoreMethods<'a, C, A> {
|
||||
hub: self.hub,
|
||||
_request: request.clone(),
|
||||
_delegate: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1519,7 +1519,6 @@ impl<'a, C, A> AccountMethods<'a, C, A> {
|
||||
_account_type: account_type.to_string(),
|
||||
_account_name: account_name.to_string(),
|
||||
_delegate: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +565,6 @@ impl<'a, C, A> MethodMethods<'a, C, A> {
|
||||
_id_token: Default::default(),
|
||||
_access_token: Default::default(),
|
||||
_delegate: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
}
|
||||
}
|
||||
@@ -574,7 +573,6 @@ impl<'a, C, A> MethodMethods<'a, C, A> {
|
||||
MethodGetCertForOpenIdConnectCall {
|
||||
hub: self.hub,
|
||||
_delegate: Default::default(),
|
||||
_scopes: Default::default(),
|
||||
_additional_params: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
rust_copy_value_s, is_required_property, organize_params, REQUEST_VALUE_PROPERTY_NAME,
|
||||
build_all_params, rb_type_params_s, hub_type_params_s, mb_type_params_s, mb_additional_type_params,
|
||||
struct_type_bounds_s, METHODS_RESOURCE, SPACES_PER_TAB, prefix_all_but_first_with,
|
||||
METHODS_BUILDER_MARKER_TRAIT, remove_empty_lines)
|
||||
METHODS_BUILDER_MARKER_TRAIT, remove_empty_lines, method_default_scope)
|
||||
%>\
|
||||
<%namespace name="util" file="../../lib/util.mako"/>\
|
||||
<%namespace name="lib" file="lib.mako"/>\
|
||||
@@ -108,7 +108,7 @@ impl${rb_params} ${ThisType} {
|
||||
${property(p.name)}: Default::default(),
|
||||
% endfor
|
||||
% for prop_key, custom_name in api.properties.iteritems():
|
||||
% if prop_key == 'scopes' and (not auth or not auth.oauth2):
|
||||
% if prop_key == 'scopes' and not method_default_scope(m):
|
||||
<% continue %>\
|
||||
% endif
|
||||
${custom_name}: Default::default(),
|
||||
|
||||
Reference in New Issue
Block a user