Просмотр исходного кода

修复允许匿名访问错误

huqi 5 лет назад
Родитель
Сommit
fdbe15ff6c

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

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