-
-
Save bitfishxyz/8a67c081362cdf5dac8aa00e7c258190 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkAuth(data) { | |
if (data.role !== 'registered') { | |
console.log('The user is not a registered user'); | |
return false; | |
} | |
if (data.grade < 1) { | |
console.log("The user's level is less than 1"); | |
return false; | |
} | |
if (data.job !== 'FE') { | |
console.log('The user is not a front-end development engineer'); | |
return false; | |
} | |
if (data.type !== 'active user') { | |
console.log('The user is not an active user'); | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment