Use capability instead of role

role is deprecated, this removes the deprecated notice when debug mode is on