Removes any external reference from the role
4234
def remove_external_references(self):
        
        for ex_ref_node in self.node.findall('externalReferences'):
            self.node.remove(ex_ref_node)
1288901
public void revoke(Grantee role) {

        if (!hasRoleDirect(role)) {
            throw Error.error(ErrorCode.X_0P503, role.getNameString());
        }

        roles.remove(role);
    }
166696
function () {
        // we unlink every member from it's parent (assuming this is their parent)
        this.all().forEach(PropertyList._unlinkItemFromParent);

        this.members.length = 0; // remove all items from list

        // now we remove all items from index reference
        Object.keys(this.reference).forEach(function (key) {
            delete this.reference[key];
        }.bind(this));
    }
268932
private void removeStoredProjection( String externalNodeKey ) {
        SessionCache systemSession = repository.createSystemSession(repository.context(), false);
        NodeKey systemNodeKey = getSystemNode(systemSession).getKey();
        MutableCachedNode systemNode = systemSession.mutable(systemNodeKey);
        ChildReference federationNodeRef = systemNode.getChildReferences(systemSession).getChild(ModeShapeLexicon.FEDERATION);

        // if we're removing a projection, one had to be stored previously, so there should be a federation node present
        assert federationNodeRef != null;

        NodeKey federationNodeKey = federationNodeRef.getKey();
        MutableCachedNode federationNode = systemSession.mutable(federationNodeKey);
        ChildReferences federationChildRefs = federationNode.getChildReferences(systemSession);

        int projectionsCount = federationChildRefs.getChildCount(ModeShapeLexicon.PROJECTION);

        for (int i = 1; i <= projectionsCount; i++) {
            ChildReference projectionRef = federationChildRefs.getChild(ModeShapeLexicon.PROJECTION, i);
            NodeKey projectionRefKey = projectionRef.getKey();
            CachedNode storedProjection = systemSession.getNode(projectionRefKey);
            String storedProjectionExternalNodeKey = storedProjection.getProperty(ModeShapeLexicon.EXTERNAL_NODE_KEY,
                                                                                  systemSession).getFirstValue().toString();
            assert storedProjectionExternalNodeKey != null;
            if (storedProjectionExternalNodeKey.equals(externalNodeKey)) {
                federationNode.removeChild(systemSession, projectionRefKey);
                systemSession.destroy(projectionRefKey);
                systemSession.save();
                break;
            }
        }
    }
1120848
def add_external_reference_to_role(self,role_id,external_ref):
        
        if self.srl_layer is not None:
            self.srl_layer.add_external_reference_to_role(role_id,external_ref)
967249
def remove_global(self, name):
        
        with self._lock:
            if self._gpayload is not None:
                if name in self._gpayload:
                    del self._gpayload[name]
                if not self._gpayload:
                    self._gpayload = None
955865
def remove_headerReference(self, type_):
        """"""
        headerReference = self.get_headerReference(type_)
        rId = headerReference.rId
        self.remove(headerReference)
        return rId
801017
def revoke_role(self, role_name, principal_name, principal_type):
    
    self.send_revoke_role(role_name, principal_name, principal_type)
    return self.recv_revoke_role()
438626
def role_delete(self, role_id, **kwargs):
        ""
        api_path = "/api/v2/roles/{role_id}"
        api_path = api_path.format(role_id=role_id)
        return self.call(api_path, method="DELETE", **kwargs)
946206
def remove_group_role(request, role, group, domain=None, project=None):
    """"""
    manager = keystoneclient(request, admin=True).roles
    return manager.revoke(role=role, group=group, project=project,
                          domain=domain)
442578
def remove_domain_user_role(request, user, role, domain=None):
    """"""
    manager = keystoneclient(request, admin=True).roles
    return manager.revoke(role, user=user, domain=domain)
982210
private synchronized void disableDeferredReferenceData() {
        deferredReferenceDataEnabled = false;
        if (parent != null && deferredReferenceDatas != null) {
            parent.removeDeferredReferenceData(this);
            deferredReferenceDatas = null;
        }
    }
204799
def remove_role(*_, role_handle=None, user_id=None):
    
    click.echo(green('\nRemoving role from user:'))
    click.echo(green('-' * 40))
    with get_app().app_context():
        user = find_user(dict(id=user_id))
        if not user:
            click.echo(red('User not found\n'))
            return

        remove_role = None
        for role in user.roles:
            if role.handle == role_handle:
                remove_role = role

        if not remove_role:
            click.echo(red('User does not have such role\n'))
            return

        user_service.remove_role_from_user(user, remove_role)
        msg = 'Role "{}" removed from user "{}"\n'.format(
            remove_role.handle,
            user.email
        )
        click.echo(green(msg))
        return
276548
def removeReferenceSet(self):
        
        self._openRepo()
        referenceSet = self._repo.getReferenceSetByName(
            self._args.referenceSetName)

        def func():
            self._updateRepo(self._repo.removeReferenceSet, referenceSet)
        self._confirmDelete("ReferenceSet", referenceSet.getLocalId(), func)
471613
def remove_exclusion(self, role, value=None):
        

        self._remove_rule(self.excludes, role, value)
665644
def remove_role(self, role):
        
        if role in self.__roles:
            self.__roles.remove(role)
1345603
def delete_role(self, name):
        # type: (str) -> None
        """"""
        client = self._client('iam')
        inline_policies = client.list_role_policies(
            RoleName=name
        )['PolicyNames']
        for policy_name in inline_policies:
            self.delete_role_policy(name, policy_name)
        client.delete_role(RoleName=name)