def permission_blacked_out(course, role_names, permission_name):
 return ((not course.forum_posts_allowed) and (role_names == {FORUM_ROLE_STUDENT}) and any([permission_name.startswith(prefix) for prefix in ['edit', 'update', 'create']]))

def permission_blacked_out ( course , role_names , permission_name ) : return ( ( not course . forum_posts_allowed ) and ( role_names == { FORUM_ROLE_STUDENT } ) and any ( [ permission_name . startswith ( prefix ) for prefix in [ 'edit' , 'update' , 'create' ] ] ) )
returns true if a user in course with the given roles would have permission_name blacked out .