google apps script - Users have no access to application -
i'm building application in google apps script. i'm authenticating domain users checking if logonid permitted use application. developed , when entered testing phase, user use application. although had set "who has access" combobox on web-app publish wizard "anyone".
when user executes application exception saying has no access when executing first function after doget(). did overlook settings or did wrong?
i use following classes:
usermanager session jdbc utilities logger this function called after doget() function:
function authenticateuser() { try { var user = usermanager.getuser(session.getactiveuser()); logger.log('user: ' + user.getemail()); if (user == undefined || user == null) { return {authenticated: false}; } else { var auth = _getauth(); if (!auth.isauthorized(user.getemail())) { logger.log('not authorized in database.'); return {authenticated: false}; } else { var profile = auth.getprofile(user.getemail()); authenticated = true; auth.setlogin(user.getemail()); if(!profile.firstlogin) { activeprofile = profile; } activeuser = user; return {profile: profile, authenticated: true}; } } } catch(ex) { logger.log(ex); return {authenticated: false}; } }
access usermanager issue here. documentation states, usermanager accessible administrators.
if app running normal user, cannot access usermanager. may need rethnk deployment/code run yourselves (or admin).
Comments
Post a Comment