Deletes the current tailored audience permission.
966920
def delete(self):
        
        resource = self.RESOURCE.format(
            account_id=self.account.id,
            tailored_audience_id=self.tailored_audience_id,
            id=self.id)
        response = Request(self.account.client, 'delete', resource).perform()
        return self.from_response(response.body['data'])
294384
private void removeFromPermissionsCache(IPermission[] permissions)
            throws AuthorizationException {
        IAuthorizationPrincipal[] principals = getPrincipalsFromPermissions(permissions);
        removeFromPermissionsCache(principals);
    }
926982
@Handler(channels = Channel.class)
    public void discard(DiscardSession event) {
        removeSession(event.session().id());
    }
691227
public function delete()
    {

        // Remove the Role from users, permissions
        // and affiliations that it had
        $this->groups()->detach();
        $this->permissions()->detach();
        $this->affiliations()->detach();

        return parent::delete();
    }
1114272
def delete(self):
        
        self.manager.session.delete(self.uri)
        self.manager._metrics_contexts.remove(self)
22210
public function onAfterUnpublish()
    {
        foreach ($this->owner->Fields() as $field) {
            $field->deleteFromStage(Versioned::LIVE);
        }
    }
105755
def revoke_group_permission(
        self, group_name, source_group_name, source_group_owner_id):
        
        d = self.revoke_security_group(
            group_name,
            source_group_name=source_group_name,
            source_group_owner_id=source_group_owner_id)
        return d
594300
public function clear()
    {
        if (null !== $this->aRole) {
            $this->aRole->removeRolePermission($this);
        }
        if (null !== $this->aPermission) {
            $this->aPermission->removeRolePermission($this);
        }
        $this->role_id = null;
        $this->permission_id = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
384687
@Override
    public void removePermissions(IPermission[] permissions) throws AuthorizationException {
        if (permissions.length > 0) {
            getPermissionStore().delete(permissions);
            if (this.cachePermissions) {
                removeFromPermissionsCache(permissions);
            }
        }
    }
6627
public void deleteProjectPermission(DbSession dbSession, int userId, String permission, long projectId) {
    mapper(dbSession).deleteProjectPermission(userId, permission, projectId);
  }
876626
def remove_permission(self, label, callback=None):
        
        return self.connection.remove_permission(self, label, callback=callback)
1313847
private void preDelete(UserProfile userProfile, boolean broadcast) throws Exception
   {
      for (UserProfileEventListener listener : listeners)
      {
         listener.preDelete(userProfile);
      }
   }
538419
def remove(self):
		

		# First, wipe default source on all customers that use this card.
		Customer.objects.filter(default_source=self.id).update(default_source=None)

		try:
			self._api_delete()
		except InvalidRequestError as exc:
			if "No such source:" in str(exc) or "No such customer:" in str(exc):
				# The exception was thrown because the stripe customer or card was already
				# deleted on the stripe side, ignore the exception
				pass
			else:
				# The exception was raised for another reason, re-raise it
				raise

		self.delete()
1317054
def del_permission(self, name):
        
        perm = self.find_permission(name)
        if perm:
            try:
                self.get_session.delete(perm)
                self.get_session.commit()
            except Exception as e:
                log.error(c.LOGMSG_ERR_SEC_DEL_PERMISSION.format(str(e)))
                self.get_session.rollback()
619264
def stop(self):
        
        self.debug("()")
        try:
            self.unjoin()
            time.sleep(2)
        except:
            self.exception("Failed to leave audience")
        super(SensorClient, self).stop()
1047476
def reset_permission_factories(self):
        """"""
        for key in ('read', 'create', 'update', 'delete'):
            full_key = '{0}_permission_factory'.format(key)
            if full_key in self.__dict__:
                del self.__dict__[full_key]
162727
def remove_transcript_preferences(course_id):
    
    try:
        transcript_preference = TranscriptPreference.objects.get(course_id=course_id)
        transcript_preference.delete()
    except TranscriptPreference.DoesNotExist:
        pass