EDataServer.WebDAVSession.set_acl_sync

### Method

# EDataServer WebDAVSessionset_acl_sync

since: 3.26

#### Declaration [src]

    gboolean
    e_webdav_session_set_acl_sync (
      EWebDAVSession* webdav,
      const gchar* uri,
      const GSList* entries,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Changes Access Control List (ACL) for the `uri`, or, in case it’s `NULL`, for the URI defined in associated `ESource`.

Make sure that the `entries` satisfy ACL restrictions, as returned by e_webdav_session_get_acl_restrictions_sync(). The order in the `entries` is preserved. It cannot contain any `E_WEBDAV_ACE_FLAG_PROTECTED`, nor `E_WEBDAV_ACE_FLAG_INHERITED`, items.

Use `e_webdav_session_get_acl_sync()` to read currently known ACL entries, remove from the list those protected and inherited, and then modify the rest with the required changed.

Note this function doesn’t support general `E_WEBDAV_ACE_PRINCIPAL_PROPERTY` and returns `G_IO_ERROR_NOT_SUPPORTED` error when any such is tried to be written.

In case the returned entries contain any `E_WEBDAV_ACE_PRINCIPAL_PROPERTY`, or there’s a need to write such Access Control Entry, then do not use e_webdav_session_get_acl_sync(), neither e_webdav_session_set_acl_sync(), and write more generic implementation.

Available since: 3.26

#### Parameters

`uri`

  Type: `const gchar*`

  URI to issue the request for, or `NULL` to read from `ESource`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`entries`

  Type: A list of `EWebDAVAccessControlEntry*`

  Entries to write.

  The data is owned by the caller of the method.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

Whether succeeded.