private boolean removeOutcast(@Nonnull final JID userAddress, @Nonnull final Affiliation actorAffiliation, @Nullable final Role actorRole) throws ForbiddenException
    {
        if (Affiliation.admin != actorAffiliation && Affiliation.owner != actorAffiliation && actorRole != Role.moderator) {
            throw new ForbiddenException();
        }
        return outcasts.remove( userAddress.asBareJID() );
    }
Adds a new user to the list of outcast users.

@param targetUserAddress The (real) JID of the user to add as an outcast.
@param reason an optional reason why the user was banned.
@param actorUserAddress The (real) address of the user that initiated the ban.
@param actorAffiliation The room affiliation of the user that initiated the ban.
@param actorRole The room role of the user that initiated the ban (can be null when the user is currently not an occupant).
@return the list of updated presences of all the client resources that the client used to
        join the room.
@throws NotAllowedException Thrown if trying to ban an owner or an administrator.
@throws ForbiddenException If the user is not allowed to modify the outcast list.
@throws ConflictException If the room was going to lose all its owners.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java