a more complete js for accessControl page