[pve-devel] r4865 - pve-access-control/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Jul 2 09:46:03 CEST 2010


Author: dietmar
Date: 2010-07-02 07:46:03 +0000 (Fri, 02 Jul 2010)
New Revision: 4865

Modified:
   pve-access-control/trunk/AccessControl.pm
Log:
cleanups from Seth


Modified: pve-access-control/trunk/AccessControl.pm
===================================================================
--- pve-access-control/trunk/AccessControl.pm	2010-07-02 07:39:26 UTC (rev 4864)
+++ pve-access-control/trunk/AccessControl.pm	2010-07-02 07:46:03 UTC (rev 4865)
@@ -529,7 +529,7 @@
 	    if ($opts->{groups}) {
 		foreach my $group (split_list ($opts->{groups})) {
 		    if ($usercfg->{groups}->{$group}) {
-			add_user_group ($username,$usercfg,$group);
+			add_user_group ($username, $usercfg, $group);
 		    } else {
 			warn "ignore group '$group' - no such group\n";
 			next;
@@ -541,15 +541,15 @@
 
 	    die "user '$username' does not exist\n" if !$usercfg->{users}->{$username};
 	    store_shadow_passwd() if !$domain && $opts->{passwd};
-	    enable_user ($username,$usercfg) if $opts->{unlock} &&
+	    enable_user ($username, $usercfg) if $opts->{unlock} &&
 		!$usercfg->{users}->{$username}->{enabled};
-	    disable_user ($username,$usercfg) if $opts->{lock} &&
+	    disable_user ($username, $usercfg) if $opts->{lock} &&
 		$usercfg->{users}->{$username}->{enabled};
-	    delete_user_group ($username,$usercfg) if (!$opts->{append} && $opts->{groups});
+	    delete_user_group ($username, $usercfg) if (!$opts->{append} && $opts->{groups});
 	    if ($opts->{groups}) {
 		foreach my $group (split_list ($opts->{groups})) {
 		    if ($usercfg->{groups}->{$group}) {
-			add_user_group ($username,$usercfg,$group);
+			add_user_group ($username, $usercfg, $group);
 		    } else {
 			warn "ignore group '$group' - no such group\n";
 			next;
@@ -557,9 +557,9 @@
 		}
 	    }
 
-	    change_password ($username,$usercfg) if $opts->{password};
-	    name_user ($username,$usercfg) if $opts->{name};
-	    comment_user ($username,$usercfg) if $opts->{comment};
+	    change_password ($username, $usercfg) if $opts->{password};
+	    name_user ($username, $usercfg) if $opts->{name};
+	    comment_user ($username, $usercfg) if $opts->{comment};
 	}
 
 	save_user_config ($usercfg);
@@ -584,8 +584,8 @@
 	delete ($usercfg->{users}->{$username})
 	    if $usercfg->{users}->{$username};
 
-	delete_user_group ($username,$usercfg);
-	delete_user_acl ($username,$usercfg);
+	delete_user_group ($username, $usercfg);
+	delete_user_acl ($username, $usercfg);
 	save_user_config ($usercfg);
     });
 
@@ -603,7 +603,7 @@
 
 sub add_user_group {
 
-    my ($username,$usercfg,$group) = @_;
+    my ($username, $usercfg, $group) = @_;
     $usercfg->{users}->{$username}->{groups}->{$group} = 1;
     $usercfg->{groups}->{$group}->{$username} = 1;
 
@@ -612,7 +612,7 @@
 
 sub delete_user_group {
 
-    my ($username,$usercfg) = @_;
+    my ($username, $usercfg) = @_;
     
     foreach my $group (keys %{$usercfg->{groups}}) {
 
@@ -624,7 +624,7 @@
 
 sub delete_user_acl {
 
-    my ($username,$usercfg) = @_;
+    my ($username, $usercfg) = @_;
 
     foreach my $acl (keys %{$usercfg->{acl}}) {
 
@@ -636,7 +636,7 @@
 
 sub disable_user {
 
-    my ($username,$usercfg) = @_;
+    my ($username, $usercfg) = @_;
 
     $usercfg->{users}->{$username} = { enabled => 0 };
 
@@ -644,7 +644,7 @@
 
 sub enable_user {
 
-    my ($username,$usercfg) = @_;
+    my ($username, $usercfg) = @_;
 
     $usercfg->{users}->{$username} = { enabled => 1 };
 




More information about the pve-devel mailing list