Procházet zdrojové kódy

Merge branch 'fix/anonymousAccess.execption' into 'wrdp'

Merge of fix/anonymousAccess.execption 修复anonymous访问可能存在的问题 to wrdp

See merge request o2oa/o2oa!2327
蔡祥熠 před 5 roky
rodič
revize
059df0b28a

+ 1 - 1
o2web/source/o2_core/o2/xAction/services/x_organization_assemble_authentication.js

@@ -43,7 +43,7 @@ MWF.xAction.RestActions.Action["x_organization_assemble_authentication"] = new C
         this.action.invoke({"name": "getAuthentication",
             "success": function(json, responseText){
                 if (json.data.tokenType!=="anonymous" || layout.anonymous){
-                    if (!json.roleList) roleList: [];
+                    if (json.data && !json.data.roleList) json.data.roleList = [];
                     if (success) success(json);
                 }else{
                     if (failure) failure(null, responseText, json.message);