ML Authentication Issues:

- Everyone, including guest, gets explicit full rights to each new cm:mlContainer instance.
 - The MultilingualContentService better permission checks against the content nodes that go in and out of it.
 - Changed some of the API return values to be more explicit about whether the cm:mlContainer or cm:mlDocument is required.
 - Added explicit tests to ensure that even guest is able to manipulate the cm:mlContainer.
ML Languages List:
 - The default value is now punted to the top of the list.
Various neatening.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5816 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-05-31 03:42:59 +00:00
parent 4ede1e61ab
commit 62965c458a
2 changed files with 7 additions and 50 deletions

View File

@@ -120,15 +120,13 @@ public class MakeMultilingualDialog extends BaseDialogBean
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
Locale loc = I18NUtil.parseLocale(getLanguage());
Locale locale = I18NUtil.parseLocale(getLanguage());
NodeRef nodeRef = this.editableNode.getNodeRef();
// make this node multilingual
NodeRef mlContainer = multilingualContentService.makeTranslation(nodeRef, loc);
// set the local of the current node.
nodeService.setProperty(nodeRef, ContentModel.PROP_LOCALE, getLanguage());
multilingualContentService.makeTranslation(nodeRef, locale);
NodeRef mlContainer = multilingualContentService.getTranslationContainer(nodeRef);
// if the author of the node is not set, set it with the default author name of
// the new ML Container
@@ -138,7 +136,6 @@ public class MakeMultilingualDialog extends BaseDialogBean
// set properties of the ml container
nodeService.setProperty(mlContainer, ContentModel.PROP_AUTHOR, getAuthor());
nodeService.setProperty(mlContainer, ContentModel.PROP_LOCALE, getLanguage());
return outcome;
}