@cache_permission
def can_suggest(user, translation):
 if (not translation.subproject.enable_suggestions):
  return False
 if has_group_perm(user, 'trans.add_suggestion', translation):
  return True
 return check_permission(user, translation.subproject.project, 'trans.add_suggestion')

@ cache_permission def can_suggest ( user , translation ) : if ( not translation . subproject . enable_suggestions ) : return False if has_group_perm ( user , 'trans.add_suggestion' , translation ) : return True return check_permission ( user , translation . subproject . project , 'trans.add_suggestion' )
checks whether user can add suggestions to given translation .