Correctly set permission on the 'home' repo if enabled
This commit is contained in:
parent
61f5ead07d
commit
247f7506fc
|
@ -37,6 +37,9 @@ unlink(</var/lib/pydio/tmp/sess_*>);
|
|||
# Remove plugin cache
|
||||
unlink(</var/cache/pydio/plugin*.ser>);
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue