updated  access callback for permission check