Sunday, July 26, 2015

WebCenter: Blog Security Issue

Users in same group can edit/delete each other blogs.

According to Doc1961188.1, there is a bug filed for this issue ref# Bug 20323352 - BLOG SECURITIES ISSUES.

Solution:

There is small customization needed for OOTB Blog Digest Viewer, i.e. for edit link change the rendered property to
rendered= "#{(row.editable and 
WCSecurityContext.currentUser[row.createdBy]) or WCSecurityContext.userInScopedRole['Moderator']}" /> 
And for delete link change the rendered property to 
rendered="#{(row.canDelete and 
WCSecurityContext.currentUser[row.createdBy]) or WCSecurityContext.userInScopedRole['Moderator']}" />
The sample application can be downloaded from Google Drive.

Saturday, July 25, 2015

WebCenter: Mobile Page Variant Not Working

Even after creating mobile page variant for specific pages, on actual device it's not rendering the created page variant.

The solution is to change the User Agent for the Desktop Chrome to do not match anything that contains Android.
So the corrected User Agent String for the Desktop Chrome looks like this: 

.(Windows|Macintosh|Linux)((?!Android).)+Chrome.+Safari.
You can change this under Administration -> Device Settings -> Desktop Chrome -> Actions -> Edit

If you install a Firefox Add-on to override the User Agent, for example User Agent Overrider at https://addons.mozilla.org/en-us/firefox/addon/user-agent-overrider/ then you can specify the user agent for Nexus 5
(Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.59 Mobile Safari/537.36)


Reference:
https://support.oracle.com/epmos/faces/DocumentDisplay?id=1614457.1