From: Andrew H. <hu...@ll...> - 2003-07-31 16:55:16
|
Hello, First off I want to thank the OI developers for writing OI. Its a pleasure to work with. My document system should be finished today (minus the rich comments, that's coming along though). The question I had was regarding security of objects. The way that I've implemented this system is with two objects, Document and DocumentPage. When you create a new Document object it doesn't actually store any text of its own. It splits on the Page Break String (you specify this in the edit template) and creates a DocumentPage for each part of the original. This makes it easier to show one page at a time, attach comments to only one page, etc etc. The DocumentPage objects will inherit their section, expires, active on, etc fields (all except their own content and title) from their parent Document. The question I had is regarding security. How can I make them inherit security as well? I've seen the object security page, and how you can edit it for one document, but when I change it for the main Document, I want it to change for all of the DocumentPages as well. The one way I've thought about doing this so far is to have each DocumentPage check the security status of its parent, and only show if the person has security for the parent. What would be really cool would be the ability to override it per-page as well ( i.e. the whole document can be seen by everyone, but the middle 26 pages can only be seen by those in the 'president' group ;) (yes this was a bad joke, and no I have no relation to any of that, nor does this code) So, is there a way to do this thats easier than managing the DocPage security within the DocumentPage handler? It seems to go outside of the idea of SPOPS and OI handling it for me, and I'd rather not do that. hmm.. maybe as a compromise I could set up a 'edit all document pages security at once' page, thats custom for DocumentPage, and just a copy of SecurityShow essentially... Thanks! -Andrew |