Check current login user permission using JSOM in SharePoint 2013/2016
 Hi All,    One of the easiest way to check the current logged in user privilege in JSOM     if  (SP.PageContextInfo.get_webPermMasks().has([26])) {          //your code goes here...     }     Below are the list of permission types and it's index.                                                                                                                                                                                                                                                                                                                                                                  Permission Type     Index       emptyMask   0    viewListItems   1    addListItems   2    editListItems   3    deleteListItems   4    approveItems   5    openItems   6    viewVersions   7    deleteVersions   8    cancelCheckout   9    managePersonalViews   10    manageLists   12    viewFormPages   13    anonymousSearchAccessList   14    open   17    viewPages   18    ...