def remove_user_permissions(self, email, perm):
    """ Revokes a capability from the specified user.

    Args:
      email: A str containing the e-mail address of the user who we wish to
        remove a permission from.
      perm: A str containing the name of the permission to remove from the user.
    Returns:
      True if the permission was removed from the user, and False otherwise.
    """
    try:
      caps_list = self.get_user_capabilities(email)
      uas = self.get_uaserver()
      if perm in caps_list:
        caps_list.remove(perm)
      else:
        return True

      ret = uas.set_capabilities(email,
        self.USER_CAPABILITIES_DELIMITER.join(caps_list), GLOBAL_SECRET_KEY)
      if ret == 'true':
        self.cache['user_caps'][email] = caps_list
        return True
      else:
        logging.error("remove_user_permissions returned: {0}".format(ret))
        return False
    except Exception as err:
      logging.exception(err)
      return False
    return True
dataset/ETHPy150Open AppScale/appscale/AppDashboard/lib/app_dashboard_helper.py/AppDashboardHelper.remove_user_permissions/original