mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +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
574e7150c7
commit
140e5a2871
@ -1369,6 +1369,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