19 lines
No EOL
392 B
TypeScript
19 lines
No EOL
392 B
TypeScript
/**
|
|
* Check if a permission is granted
|
|
* @param {Array<String>} perm - Is the permission that the user have
|
|
* @param {Array<String>} reqPerm - Is the required permissions
|
|
* @returns {Boolean}
|
|
*/
|
|
function checkList(perm: string[], reqPerm: string[]) {
|
|
let answer = false, trueL = 0;
|
|
|
|
for (const p of perm) {
|
|
|
|
}
|
|
|
|
return answer;
|
|
}
|
|
|
|
export default {
|
|
checkList,
|
|
} |