docs: def add_perm(perm,**kwargs):
      """
          Add a permission
      """
      #check_perm(kwargs.get('user_id'), 'add_perm')
      perm_i = Perm(name=perm.name, code=perm.code)
      db.DBSession.add(perm_i)
      db.DBSession.flush()
  
      return perm_i