Modified test script to include user permissions.