‎2020 Oct 06 8:35 AM - edited ‎2024 Feb 03 7:31 PM
Dear Experts,
In normal circumstances one user cant see another user details due to search restriction , is there any way to disable on some special circumstances without disturbing the current restriction ?
Appriciate your inputs on this.
Request clarification before answering.
You can use getSearchRestrictionService().disableSearchRestrictions(); to disable restrictions and then re-enable ina finally block getSearchRestrictionService().enableSearchRestrictions();.
Please execute the overall code block in the local view.
Something like below:
return getSessionService().executeInLocalView(new SessionExecutionBody()
{
@Override
public Object execute()
{
try
{
getSearchRestrictionService().disableSearchRestrictions();
<Your custom code>
}finally
{
getSearchRestrictionService().enableSearchRestrictions();
}
}
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.