Commit ccc54a15 authored by hujun's avatar hujun

超级管理员前端验证

parent 2a54f39c
...@@ -98,11 +98,15 @@ function check_auth(auth_rule) { ...@@ -98,11 +98,15 @@ function check_auth(auth_rule) {
var user_info = JSON.parse(user_info_obj); var user_info = JSON.parse(user_info_obj);
var result = false; var result = false;
$.each(user_info.auth,function (i, val) { if (user_info.id != 1) {
if (val['name'] == auth_rule) { $.each(user_info.auth,function (i, val) {
result = true; if (val['name'] == auth_rule) {
} result = true;
}); }
});
} else {
result = true;
}
return result; return result;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment