This is post regarding a bug.That a user who granted power by owner cannot allowed to revoke his/her role. I was trying to post it under openfire server issue with its solution.
go in IQAdminHandler file replace IQHandle() method
public void handleIQ(IQ packet, MUCRole role) throws ForbiddenException, ConflictException,
NotAllowedException, CannotBeInvitedException {
IQ reply = IQ.createResultIQ(packet);
Element element = packet.getChildElement();
// Analyze the action to perform based on the included element
@SuppressWarnings("unchecked")
List<Element> itemsList = element.elements("item");
if (!itemsList.isEmpty() && packet.getFrom() == null) {
handleItemsElement(role, itemsList, reply);
} else if (!itemsList.isEmpty() && !itemsList.toString().contains(packet.getFrom().toBareJID())) {
handleItemsElement(role, itemsList, reply);
} else {
// An unknown and possibly incorrect element was included in the query
// element so answer a BAD_REQUEST error
reply.setChildElement(packet.getChildElement().createCopy());
reply.setError(PacketError.Condition.bad_request);
}
if (reply.getTo() != null) {
// Send a reply only if the sender of the original packet was from a real JID. (i.e. not
// a packet generated locally)
router.route(reply);
}
}
Many peoples looking for this solution. I hope it helps them.