def _has_wiki_staff_access(user, wiki_slug, modstore):
 course_keys = modstore.get_courses_for_wiki(wiki_slug)
 if (wiki_slug.endswith('_') and slug_is_numerical(wiki_slug[:(-1)])):
  course_keys.extend(modstore.get_courses_for_wiki(wiki_slug[:(-1)]))
 for course_key in course_keys:
  course = modstore.get_course(course_key)
  if courseware.access.has_access(user, 'staff', course, course_key):
   return True
 return False

def _has_wiki_staff_access ( user , wiki_slug , modstore ) : course_keys = modstore . get_courses_for_wiki ( wiki_slug ) if ( wiki_slug . endswith ( '_' ) and slug_is_numerical ( wiki_slug [ : ( - 1 ) ] ) ) : course_keys . extend ( modstore . get_courses_for_wiki ( wiki_slug [ : ( - 1 ) ] ) ) for course_key in course_keys : course = modstore . get_course ( course_key ) if courseware . access . has_access ( user , 'staff' , course , course_key ) : return True return False
returns whether the user has staff access to the wiki represented by wiki_slug .