Hello everyone, I'm working on restricting access ...
# suitescript
s
Hello everyone, I'm working on restricting access to a Suitelet for users who does not have CSV import permissions. I attempted to check this using the following code:
Copy code
var userObj = runtime.getCurrentUser();
log.debug('userObj', userObj);
var userPermission = userObj.getPermission({
    name: 'ADMI_IMPORTCSVFILE'
});
However, this code consistently returns a permission level of
4
, regardless of whether the current user actually has CSV import permissions. Any guidance or suggestions would be greatly appreciated!
v
4 is FULL. What is "execute as role" set to on the suitelet deployment?
s
Hi @verikott Thank you so much for your help! I hadn't noticed that, but it worked perfectly