import { IUser } from "@esri/arcgis-rest-auth" ; param { current user param { array } privileges export function hasAllPrivileges ( user , privileges ) { let result = false ; if ( Array . isArray ( privileges ) ) { result = privileges . every ( priv => user . privileges . indexOf ( priv ) > - 1 ) ; } return result ; }