From: Dan M. <dan...@gm...> - 2011-10-18 12:51:09
|
I have also had a challenge using the new permission structure. Although I fully support Adam's efforts I have had to build "wrappers" for any function that updated resources to fix the permissions. The changing of permissions also seems to occur when you use the new in-database subversion module. So the fix-permissions() function has to be run after every subversion:commit(). I wonder if there is any way a configuration option be added so that the user could specify what permission structure is used for new resources much like the UNIX "umask" function. - Dan On Tue, Oct 18, 2011 at 7:27 AM, Wolfgang Meier <wol...@ex...>wrote: > Chris, > > a quick way of changing permissions on a collection tree would be to > run a query like the following: > > xquery version "1.0"; > > declare function local:fix-permissions($collection, $permissions, > $xqpermissions) { > sm:chmod(xs:anyURI($collection), $permissions), > for $resource in xmldb:get-child-resources($collection) > return > if (xmldb:get-mime-type(xs:anyURI((concat($collection, "/", > $resource)))) eq "application/xquery") then > sm:chmod(xs:anyURI(concat($collection, "/", $resource)), > $xqpermissions) > else > sm:chmod(xs:anyURI(concat($collection, "/", $resource)), > $permissions), > for $child in xmldb:get-child-collections($collection) > return > local:fix-permissions(xs:anyURI(concat($collection, "/", > $child)), $permissions, $xqpermissions) > }; > > local:fix-permissions("/db", "rw-r--r--") > > But this doesn't solve the problem if you are constantly uploading new > resources. I wonder how difficult it would be to re-enable the default > collection permissions for now? I'll look at the corresponding > revisions. > > Wolfgang > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > -- Dan McCreary Semantic Solutions Architect office: (952) 931-9198 cell: (612) 986-1552 |