async def delUser(self, name): if name == 'root': raise s_exc.CantDelRootUser(mesg='user "root" may not be deleted') user = self.usersbyname.get(name) if user is None: raise s_exc.NoSuchUser(name=name) self.usersbyiden.pop(user.iden) self.usersbyname.pop(user.name) path = self.node.full + ('users', user.iden) await self.node.hive.pop(path)
async def delUser(self, name): if name == 'root': raise s_exc.CantDelRootUser(mesg='user "root" may not be deleted') user = await self.getUserByName(name) if user is None: raise s_exc.NoSuchUser(name=name) self.usersbyiden.pop(user.iden) self.usersbyname.pop(user.name) path = self.node.full + ('users', user.iden) for gate in self.authgates.values(): await gate._delGateUser(user.iden) await user.fini() await self.node.hive.pop(path)