czl-web/js/my/permission.js

24 lines
442 B
JavaScript
Raw Normal View History

2025-05-20 13:54:27 +08:00
function checkPermission() {
var pers = [];
$.ajax({
type : 'get',
url : ctxPath + '/permissions/owns',
2025-10-28 14:56:50 +08:00
<<<<<<< .mine
=======
2025-05-22 09:52:12 +08:00
// contentType : "application/json; charset=utf-8",
2025-10-28 14:56:50 +08:00
>>>>>>> .theirs
2025-05-20 13:54:27 +08:00
async : false,
success : function(data) {
pers = data;
$("[permission]").each(function() {
var per = $(this).attr("permission");
if ($.inArray(per, data) < 0) {
$(this).hide();
}
});
}
});
return pers;
}