]> git.proxmox.com Git - pmg-api.git/blobdiff - PMG/UserConfig.pm
PMG/RuleDB/Notify.pm: allow to use wide UTF-8 characters
[pmg-api.git] / PMG / UserConfig.pm
index 0b9a73da6850b16d92b590cc7b271fd4528df637..f3bc2e315b304ee4942315a8f0ef3179be0742ea 100644 (file)
@@ -81,7 +81,7 @@ my $schema = {
        role => {
            description => "User role. Role 'root' is reseved for the Unix Superuser.",
            type => 'string',
-           enum => ['root', 'admin', 'qmanager', 'audit'],
+           enum => ['root', 'admin', 'helpdesk', 'qmanager', 'audit'],
        },
        firstname => {
            description => "First name.",
@@ -129,7 +129,7 @@ $update_schema->{properties}->{delete} = {
     optional => 1,
 };
 
-my $verity_entry = sub {
+my $verify_entry = sub {
     my ($entry) = @_;
 
     my $errors = {};
@@ -203,7 +203,7 @@ sub read_user_conf {
                    $d->{$k} = $+{$k} if $+{$k};
                }
                eval {
-                   $verity_entry->($d);
+                   $verify_entry->($d);
                    $cfg->{$d->{userid}} = $d;
                    die "role 'root' is reserved\n"
                        if $d->{role} eq 'root' && $d->{userid} ne 'root@pmg';
@@ -241,7 +241,7 @@ sub write_user_conf {
        $d->{userid} = $userid;
 
        die "invalid userid '$userid'\n" if $userid eq 'root@pmg';
-       $verity_entry->($d);
+       $verify_entry->($d);
        $cfg->{$d->{userid}} = $d;
 
        if ($d->{userid} ne 'root@pam') {