def user_can_edit_snippet_type(user, model):
 for action in (u'add', u'change', u'delete'):
  if user.has_perm(get_permission_name(action, model)):
   return True
 return False

def user_can_edit_snippet_type ( user , model ) : for action in ( u'add' , u'change' , u'delete' ) : if user . has_perm ( get_permission_name ( action , model ) ) : return True return False
true if user has add .