check the users has permission for special table

I was searching for the function to check the User Permission for a particular Table.
e.g.
If (check user permission for table1) echo “You can List the Table1”;
elseIf (check user permission for table2) echo “You can List the Table2”;Can anyone please guide me how to get it.

This code is v2018,
$val = (Security()->CurrentUserLevelPriv(CurrentProjectID().“tablename”) & EW_ALLOW_LIST); // return boolean

I am using 2019
while using the above code I got an error as
“Fatal error: Call to Protected method”

Change this code:
$val = (Security()->CurrentUserLevelPriv(CurrentProjectID().“tablename”) & EW_ALLOW_LIST); // return booleanto:
$val = (Security()->currentUserLevelPriv(CurrentProjectID().“tablename”) & ALLOW_LIST); // return booleanthen try again.

You may try:Security()->allowList(“tablename”)There are also allowView(), allowAdd() and allowEdit() methods.

I’ve just noticed there’s no:
Security()->AllowDelete(“tablename”)

Why is that so?

You may just write your own.