[pve-devel] [PATCH v2 access-control 1/4] use PVE::DataCenterConfig
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Nov 11 11:28:08 CET 2019
since we read datacenter.cfg, and parse the u2f property string using a
format defined in PVE::DataCenterConfig.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
Notes:
needs a dependency on libpve-cluster-perl
PVE/API2/AccessControl.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/API2/AccessControl.pm b/PVE/API2/AccessControl.pm
index c2324e8..4873e4e 100644
--- a/PVE/API2/AccessControl.pm
+++ b/PVE/API2/AccessControl.pm
@@ -10,6 +10,7 @@ use PVE::Exception qw(raise raise_perm_exc);
use PVE::SafeSyslog;
use PVE::RPCEnvironment;
use PVE::Cluster qw(cfs_read_file);
+use PVE::DataCenterConfig;
use PVE::RESTHandler;
use PVE::AccessControl;
use PVE::JSONSchema qw(get_standard_option);
@@ -389,7 +390,7 @@ sub get_u2f_config() {
my $dc = cfs_read_file('datacenter.cfg');
my $u2f = $dc->{u2f};
die "u2f not configured in datacenter.cfg\n" if !$u2f;
- $u2f = PVE::JSONSchema::parse_property_string($PVE::Cluster::u2f_format, $u2f);
+ $u2f = PVE::JSONSchema::parse_property_string($PVE::DataCenterConfig::u2f_format, $u2f);
return $u2f;
}
--
2.20.1
More information about the pve-devel
mailing list