Created
June 26, 2013 20:09
-
-
Save wolfgangmm/5871157 to your computer and use it in GitHub Desktop.
Change group on all resources/collections in eXist-db root collection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.0"; | |
import module namespace dbutil="http://exist-db.org/xquery/dbutil" at "/db/apps/shared-resources/content/dbutils.xql"; | |
let $root := "/db" | |
return | |
dbutil:scan(xs:anyURI($root), function($collection, $resource) { | |
if ($resource) then | |
sm:chgrp($resource, "biblio.users") | |
else | |
sm:chgrp($collection, "biblio.users") | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment