Projects tigase _server tigase-http-api Issues #106
Can't remove user for non-existent VHost (#106)
Closed
wojciech.kapcia@tigase.net opened 4 years ago

Currently DELETE method in UserAdmin script can't delete user if it belongs to VHost that doesn't exist locally (because created ad-hoc is addressed to sess-man on that VHost, which results in redirection to s2s instead of sess-man).

Maybe we could replace it with direct call to the repository?:

		execDelete = { Service service, callback, user, localPart, domain ->
			def jid = BareJID.bareJIDInstance(localPart, domain);
			def uid = service.getUserRepository().getUserUID(jid);
			service.getUserRepository().removeUser(jid);
			service.getAuthRepository().removeUser(jid);
			callback([ user: [ jid: jid.toString(), domain: domain, uid: uid ] ]);
		}

(I tested it locally and it works well but I'd prefer that run that by you)

Andrzej Wójcik (Tigase) commented 4 years ago

@wojtek This change is OK with me. I think it was done with ad-hoc as REST was designed to be based on ad-hocs.

wojciech.kapcia@tigase.net commented 4 years ago

Thank you, commited.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.2.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-http-api#106
Please wait...
Page is in error, reload to recover