|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
本帖最后由 ynss 于 2013/1/24 15:07 编辑
新建TT1角色,发现非System Administrator角色的用户登录都会提示NoValidAcctInfo。
查找部分源代码:
String sql = "SELECT * "
+ + "FROM C_AcctSchema a, AD_ClientInfo c "
+ + "WHERE a.C_AcctSchema_ID=c.C_AcctSchema1_ID "
+ + "AND c.AD_Client_ID=?";
+ PreparedStatement pstmt = null;
+ ResultSet rs = null;
+ try
+ {
+
+ int C_AcctSchema_ID = 0;
+
+ pstmt = DB.prepareStatement(sql, null);
+ pstmt.setInt(1, AD_Client_ID);
+ rs = pstmt.executeQuery();
+
+ if (!rs.next())
+ {
+ // No Warning for System
+ if (AD_Role_ID != 0)
+ retValue = "NoValidAcctInfo";
+ }
+ else
+ {
+ // Accounting Info
+ C_AcctSchema_ID = rs.getInt("C_AcctSchema_ID");
+ Env.setContext(m_ctx, "$C_AcctSchema_ID", C_AcctSchema_ID);
+ Env.setContext(m_ctx, "$C_Currency_ID", rs.getInt("C_Currency_ID"));
+ Env.setContext(m_ctx, "$HasAlias", rs.getString("HasAlias"));
+ }
+ rs.close();
+ pstmt.close();
首先查看数据库C_AcctSchema表C_AcctSchema_ID字段等于AD_ClientInfo表C_AcctSchema1_ID字段的记录发现只有
AD_CLIENT_ID=11,C_ACCTSCHEMA_ID的这条记录。
再看登陆界面Client选项中只有System可选,再看新建的角色:TT1,系统默认只能选择System。在AD_CLIENT表中AD_CLIENT_ID=0是System,AD_CLIENT_ID=11是GardenWorld。所以这个系统中无论怎么建立角色,都会报错。
在系统中打开client窗口找到client也签,发现在Comment/Help内容中有如下信息:
The Client Definition Tab defines a unique client.
Do not create a new client in this window, but use "Initial Client Setup" (System Administrator Role) to set up the required security and access rules. If you create a new client here, you will not be able to view it and also the required client infrastructure would not have been set up.
应该是不允许使用除System外的其他Client,如:GardenWorld
请问该如何用非System Administrator角色的用户从网页登陆呢?谢谢
|
|