workspace.useUserAccess(true); (in old versions it is useLiveAccess)
true------user Access
false-----contributer access
Note: The Access context used in the API can be set at any time, after the creation of the workspace.
Scenarios:
Problem WCM API method workspace.getById() fails for content or library component even though the user is given "User" access.
Cause This method requires minimum "Contributor" access on wcm content or library component to get desired results.
Resolving the problem In order to resolve this issue , call API method "workspace.useUserAccess(true)" just before calling the workspace.getById() method . Otherwise , the default access context is "Contributor" and hence method workspace.getById() fails for content or library component even though the user is given "User" access.
Resources:
Authorizationexception is thrown while using workspace.getById() method (https://www-304.ibm.com/support/docview.wss?uid=swg21399507)
No comments:
Post a Comment