Skip to content

Ability to push/enforce default settings in desktop client #7956

Closed

Description

@RobinMcCorkell

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.

Activity

  1. modified the milestone: backlog on Mar 21, 2015
  2. changed the title [-]Ability to push default settings to mirall client[/-] [+]Ability to push/enforce default settings in desktop client[/+] on Dec 13, 2017
  3. PVince81 commented on Dec 18, 2017

    @PVince81
    Contributor

    ref from duplicate with some example config structure: #22607

  4. MarkMaldaba commented on Dec 18, 2017

    @MarkMaldaba

    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:

    1. 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.
    2. 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.
    3. 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.

  5. MarkMaldaba commented on Sep 23, 2021

    @MarkMaldaba

    Why was this closed? Has it been implemented?

    Poor form to close without comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions