mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
Filemanager: Don't allow permission changes (through UI) on /, /home or /apps since it tends to cause problems
This commit is contained in:
parent
06ceeb54e3
commit
bf7770befe
@ -1379,6 +1379,19 @@ class filemanager_ui
|
||||
$readonlys['comment'] = !Vfs::is_writable($path);
|
||||
$readonlys['tabs']['filemanager.file.preview'] = $readonlys['tabs']['filemanager.file.perms'] = $content['is_link'];
|
||||
|
||||
// Don't allow permission changes for these, even for root - it causes too many problems.
|
||||
// Use the CLI if you really need to make changes
|
||||
if(in_array($content['path'], ['/','/home','/apps']))
|
||||
{
|
||||
foreach($content['perms'] as $name => $value)
|
||||
{
|
||||
$readonlys['perms['.$name.']'] = true;
|
||||
}
|
||||
$readonlys['gid'] = true;
|
||||
$readonlys['uid'] = true;
|
||||
$readonlys['modify_subs'] = true;
|
||||
}
|
||||
|
||||
// if neither owner nor is writable --> disable save&apply
|
||||
$readonlys['button[save]'] = $readonlys['button[apply]'] = !$content['is_owner'] && !Vfs::is_writable($path);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user