MCPcopy Index your code
hub / github.com/tinode/chat / Userdel

Class Userdel

tn-cli/macros.py:241–260  ·  view source on GitHub ↗

Deletes a user account.

Source from the content-addressed store, hash-verified

239 '.use --user "%s"' % old_user]
240
241class Userdel(Macro):
242 """Deletes a user account."""
243
244 def name(self):
245 return "userdel"
246
247 def description(self):
248 return "Delete user account (requires root privileges)"
249
250 def add_parser_args(self):
251 self.parser.add_argument('userid', help='User id')
252 self.parser.add_argument('--hard', action='store_true', help='Hard delete')
253
254 def expand(self, id, cmd, args):
255 if not cmd.userid:
256 return None
257 del_cmd = 'del user --user %s --as_root' % cmd.userid
258 if cmd.hard:
259 del_cmd += ' --hard'
260 return [del_cmd]
261
262
263class Chcred(Macro):

Callers 1

macros.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…