hn_cloud_web/smz-web/js/my/permission.js

20 lines
400 B
JavaScript
Raw Normal View History

2025-11-27 16:55:35 +08:00
function checkPermission() {
var pers = [];
$.ajax({
type : 'get',
url : ctxPath + '/permissions/owns',
contentType : "application/json; charset=utf-8",
async : false,
success : function(data) {
pers = data;
$("[permission]").each(function() {
var per = $(this).attr("permission");
if ($.inArray(per, data) < 0) {
$(this).hide();
}
});
}
});
return pers;
}