[daisy] Publish immediately & no publishing permissions in document editor

Karel Vervaeke karel at outerthought.org
Fri Jun 6 12:58:04 CEST 2008


All cases where the the 'publish' access changes while editing are more
of a non-issue: The user can always go to the versions page and change
the version state afterwards.
Then the publish access is revoked during editing however, the user
should be warned if the new version's state is not 'publish' as per his
request.

Karel

On Fri, 2008-06-06 at 11:01 +0200, Karel Vervaeke wrote:
> It is currently not possible to do that using styling, so there would be
> some more work involved.
> 
> There is one little catch: you can't really be sure that the user will
> be allowed to publish unless you have the complete document information
> (e.g. an Acl entry might deny publish rights if the document exceeds a
> particular amount of bytes).  Don't worry too hard though: (a) this is a
> bordercase and (b) one could work around this by submitting the document
> temporarily by hitting the html cleaner button or by going back and
> forth to another tab in the editor.
> 
> Anyway, now for the implementation part:
> 
> look for publishImmediately in documenteditor.xml, you will either want
> to
> (a) hide the checkbox if the user is not allowed to publish
> (b) make the checkbox unchecked + disabled
> (c) just display a warning if the user tries to uncheck it.
> 
> in DocumentEditorApple.java, add something like this: (copied from
> LocalDocumentStrategy.store(...)
> 
> AclResultInfo newAclInfo =
> context.getCommonRepository().getAccessManager().getAclInfoOnLive(systemUser, documentInt.getCurrentUser().getId(),documentInt.getCurrentUser().getActiveRoleIds(), document);
> 
> boolean canPublish = newAclInfo.isAllowed(AclPermission.PUBLISH);
> 
> (put the canPublish parameter in the viewData so you can use it in the
> documenteditor.xml template)
> 
> This seems like a general improvement, so feel free to create a Jira
> issue.  Don't forget to attach a patch if you implement this.
> 
> Regards,
> Karel
> 
> 
> On Thu, 2008-06-05 at 22:40 +0100, Iolanda Da Costa Martins wrote:
> > I have a Document Collection where a certain role does not have publishing permissions.
> >  
> > However, a user acting in that role can still see the 'publish immediately' check box/label and check it before saving. I know that it does not work: ie, if the save option is selected but the user does not have such permissions, the result will be a new draft version, not publish version.
> >  
> > I would like to do is to hide away that option when the ACL says that the publish permission is denied. 
> >  
> > I know how I can filter out stuff based on ACL in the menus, but I can not find a way of doing this in the editor.
> >  
> > Cheers,
> >  
> > Iolanda
> > Chordiant Software International Ltd. Registered office: Chiswick Park Building 10, 566 Chiswick High Road, London W4 5XS Registered in UK no. 02155722 and VAT no. GB 479 9023 02 The information transmitted herewith is sensitive information of Chordiant Software or its customers and is intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
> > _______________________________________________
> > daisy community mailing list
> > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> > mail to: daisy at lists.cocoondev.org
> > list information: http://lists.cocoondev.org/mailman/listinfo/daisy
> _______________________________________________
> daisy community mailing list
> Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy


More information about the daisy mailing list