test accessdenied functionality