[WSFW004]Access Denied
Access to this resource is prohibited. (system.useradmin.generic.VIEW)
I am encountering Access Error whenever calling UserWS.getUser() method from my buildng block.
The code snippet is as follows:
UserFilter uf = new UserFilter();
uf.setId(lstEnrolledIds);
uf.setFilterType(2); // GET_USER_BY_ID_WITH_AVAILABILITY
UserWS uWS = UserWSFactory.getUserWSForTool();
UserVO[] lstUserVO = uWS.getUser(uf);
The error details are:
INFO | jvm 1 | 2018/04/11 09:31:02 | SEVERE: Servlet.service() for servlet [jsp] in context with path [/webapps/ntu-hdlgrade-BBLEARN] threw exception [java.lang.RuntimeException: [WSFW004]<b>Access Denied</b><br>Access to this resource is prohibited. (system.useradmin.generic.VIEW)] with root cause
INFO | jvm 1 | 2018/04/11 09:31:02 | blackboard.platform.security.AccessException: <b>Access Denied</b><br>Access to this resource is prohibited. (system.useradmin.generic.VIEW)
INFO | jvm 1 | 2018/04/11 09:31:02 | at blackboard.platform.security.SecurityUtil.checkEntitlement(SecurityUtil.java:199)
INFO | jvm 1 | 2018/04/11 09:31:02 | at blackboard.platform.ws.AxisHelpers.logAndValidateMethodCallBefore(AxisHelpers.java:273)
INFO | jvm 1 | 2018/04/11 09:31:02 | at blackboard.platform.ws.WebServiceWrapper.invoke(WebServiceWrapper.java:146)
INFO | jvm 1 | 2018/04/11 09:31:02 | at com.sun.proxy.$Proxy939.getUser(Unknown Source)
INFO | jvm 1 | 2018/04/11 09:31:02 | at org.apache.jsp.process_005fpreview_jsp._jspService(process_005fpreview_jsp.java:134)
Resolved.
You can give "system.user.VIEW" entitlement in bb-manifest.xml.
Or you can directly give permission on your JSP page. .