diff --git a/root/etc/e-smith/events/actions/pydio-user-rights b/root/etc/e-smith/events/actions/pydio-user-rights index 3613d72..9ce364d 100644 --- a/root/etc/e-smith/events/actions/pydio-user-rights +++ b/root/etc/e-smith/events/actions/pydio-user-rights @@ -37,6 +37,9 @@ unlink(); # Remove plugin cache unlink(); +my $pydio = $c->get('pydio') || die "Couldn't find pydio entry in ConfigDB\n"; +my $homedir = $pydio->prop('HomeDir') || 'none'; + foreach my $user (($a->users),$a->get('admin')){ my $name = $user->key; my $first = $user->prop('FirstName') || ''; @@ -86,6 +89,10 @@ foreach my $user (($a->users),$a->get('admin')){ # Special case: admin has access to everything $data->{"\0*\0acls"}->{$sharename} = 'rw' if ($name eq 'admin'); } + # Set ACL for the private homedir if enabled + if ($homedir eq 'enabled' || ($homedir eq 'users' && (($user->prop('PydioHomeDir') || 'disabled') eq 'enabled'))){ + $data->{"\0*\0acls"}->{'home'} = 'r'; + } # As we're here, lets update the email address and the display name # First, delete parameter if it's an array (meaning it's empty) delete $data->{"\0*\0parameters"} if (ref ($data->{"\0*\0parameters"})=~ m/ARRAY/i); @@ -101,9 +108,6 @@ foreach my $user (($a->users),$a->get('admin')){ chown '0', '102', "/var/lib/pydio/plugins/auth.serial/$name/role.ser"; } -my $pydio = $c->get('pydio') || die "Couldn't find pydio entry in ConfigDB\n"; -my $homedir = $pydio->prop('HomeDir') || 'none'; - if ($homedir eq 'enabled'){ foreach ($a->users){ my $name = $_->key;