Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
RobinMcCorkell opened this issue Mar 31, 2014 · 3 comments
Closed

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

RobinMcCorkell opened this issue Mar 31, 2014 · 3 comments

Comments

@RobinMcCorkell
Copy link
Member

RobinMcCorkell commented Mar 31, 2014

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.

@PVince81
Copy link
Contributor

ref from duplicate with some example config structure: #22607

@MarkMaldaba
Copy link

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.

@MarkMaldaba
Copy link

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
Projects
None yet
Development

No branches or pull requests

6 participants