Display Staff for certain user roles

Hello,
Could you please help me write some code to display a Staff label if the user is an Editor or Administrator? This is what I came up with, will it work?

if (current_user_can('edit_posts') ) {
     echo "Staff";
}

This code will be put in the Member Header template for BuddyPress.

Thanks,
Alex :smiley: