You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to push/enforce default settings in desktop client #7956
As a complement to owncloud/client#100 (and possibly other features), it would be neat to have the ability to push default settings to a client when they add an account, or when a new top level directory is sync'd. This could be used to implement #7909 and #7234: the administrator could provide default settings not to synchronise some shares, with the client able to override those settings if they so wish.
changed the title [-]Ability to push default settings to mirall client[/-][+]Ability to push/enforce default settings in desktop client[/+]on Dec 13, 2017
For reference, here is the config structure I suggested in #22607:
To help the discussion, I have put together a sample client_config.php file:
<?php$CLIENT_CONFIG = array (
'sync_hidden_files' => false,
'sync_hidden_files_locked' => false,
'ignore_patterns' => array(
// Fully-populated array example:array(
'pattern' => "*~",
'may_be_deleted' => false,
'is_locked' => true,
),
// May be sparsely populated, in which case defaults are used for any// missing items.array(
'pattern' => "].DS_Store",
'may_be_deleted' => true,
),
array(
'pattern' => ".~lock.*",
),
// If only a pattern needs to be specified (i.e. if all the flags should be set// to the default value), then you can specify the pattern as a string, which// simplifies the file a lot for most use-cases:"~*.tmp",
"]*.~*",
"]Icon\\r*",
// ... etc ...
),
);
Some notes:
The may_be_deleted argument indicates whether the file may be deleted by OwnCloud if the parent folder is deleted (as per the preferences UI). This setting may be omitted, in which case it defaults to false.
The is_locked argument indicates whether the client allows the user to edit/remove the item. May be omitted, in which case it defaults to true.
sync_hidden_files_locked indicates whether the client can change the sync hidden files option, and defaults to false if omitted.
Points 2 and 3 imply that the client will need to keep track of situations where the client has explicitly deleted/modified a client-supplied pattern, so that changes to the server config are applied correctly (i.e. they don't restore a pattern that the user has deleted). Though, obviously, if the server changes the is_locked setting from false to true then the pattern should re-appear as per the server definition.
Not that may_be_deleted is a confusing name, but it was chosen to match the confusing ignore list UI. I would much rather invert the flag and call it block_folder_deletion, defaulting to to true, but that might cause issues as it is the inverse of the current implementation.
Activity
[-]Ability to push default settings to mirall client[/-][+]Ability to push/enforce default settings in desktop client[/+]PVince81 commentedon Dec 18, 2017
ref from duplicate with some example config structure: #22607
MarkMaldaba commentedon Dec 18, 2017
For reference, here is the config structure I suggested in #22607:
To help the discussion, I have put together a sample
client_config.phpfile:Some notes:
may_be_deletedargument indicates whether the file may be deleted by OwnCloud if the parent folder is deleted (as per the preferences UI). This setting may be omitted, in which case it defaults to false.is_lockedargument indicates whether the client allows the user to edit/remove the item. May be omitted, in which case it defaults to true.sync_hidden_files_lockedindicates whether the client can change the sync hidden files option, and defaults to false if omitted.Points 2 and 3 imply that the client will need to keep track of situations where the client has explicitly deleted/modified a client-supplied pattern, so that changes to the server config are applied correctly (i.e. they don't restore a pattern that the user has deleted). Though, obviously, if the server changes the
is_lockedsetting from false to true then the pattern should re-appear as per the server definition.Not that
may_be_deletedis a confusing name, but it was chosen to match the confusing ignore list UI. I would much rather invert the flag and call itblock_folder_deletion, defaulting to to true, but that might cause issues as it is the inverse of the current implementation.MarkMaldaba commentedon Sep 23, 2021
Why was this closed? Has it been implemented?
Poor form to close without comment.