WSFW004 拒绝访问 getUser 方法 (UserWS)

WSFW004 Access Denied for getUser method (UserWS)

[WSFW004]拒绝访问
禁止访问此资源。 (system.useradmin.generic.VIEW)

每当从我的构建块调用 UserWS.getUser() 方法时,我遇到访问错误。

代码片段如下:

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);

错误详情为:

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)

已解决。

您可以在 bb-manifest.xml 中授予 "system.user.VIEW" 权利。

或者您可以直接在 JSP 页面上授予权限。 .