You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Andreas Probst <an...@gmx.net> on 2002/09/26 18:50:16 UTC

might be solved, was RE: Blocking writing directly into /history

Peter,

setting scope to /files as Jean-Philippe adviced I think I don't 
need to trick Slide anymore.

Thanks.

Andreas



> Andreas,
> sorry for not replying ... give us another moment to think about, please.
> Regards,
> Peter
> 
> ---------------------------------------
> Dr. Peter Nevermann
> Software AG, Research & Development
> Uhlandstr. 12, 64292 Darmstadt, Germany
> +49-6151-92-1828 (phone), 92-1609 (fax)
> mailto:peter.nevermann@softwareag.com
> http://www.softwareag.com
>  
> 
> > -----Original Message-----
> > From: Andreas Probst [mailto:andpro77@gmx.net]
> > Sent: Thursday, September 26, 2002 12:24
> > To: Slide Users Mailing List
> > Subject: Re: Blocking writing directly into /history
> > 
> > 
> > No opinion?
> > 
> > > Hi Sliders,
> > > 
> > > how can I block writing into /history when I would like to 
> > > enable versioning? If I don't give read and write permission on 
> > > /history the user cannot put a file anywhere, when versioning is 
> > > enabled.
> > > 
> > > I did a kind of hack. Instead of initialising the 
> > > VersioningHelper in PutMethod with a SlideToken containing the 
> > > logged-in user, I create a new SlideToken, set new 
> > > CredentialsToken with /users/root and pass this to the 
> > > VersioningHelper. So Slide thinks, that the versioning part of 
> > > put is done by /users/root, no matter which user is logged in. 
> > > Of course /users/root has full access on /history. This seems to 
> > > work. The logged-in user is still the owner of the just put 
> > > file. The owner of the file under /history isn't /users/root but 
> > > /users/guest. (See my other mail from today.)
> > > 
> > > I suppose I would have to change or better extend all methods 
> > > which are doing something regarding versioning.
> > > 
> > > Here the code:
> > > 
> > > I inserted the following lines of code in the beginning of 
> > > org.apache.slide.webdav.method.PutMethod.parseRequest()
> > > 
> > >  SlideToken sToken = WebdavUtils.getSlideToken(req);
> > >  CredentialsToken credToken = new CredentialsToken("root");
> > >  sToken.setCredentialsToken(credToken);
> > > 
> > > and put sToken instead of slideToken in the following line
> > > 
> > >  versioningHelper = VersioningHelper.getVersioningHelper(sToken, 
> > > token, req, resp, config);
> > > 
> > >  
> > > I can't imagine, that this kind of tricking Slide is the right 
> > > solution to enable versioning while blocking write and/or read 
> > > access on /history. What do you think?
> > > 
> > > I would really appreciate if you responded.
> > > 
> > > Andreas
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>