ekk
  • Grant one user full control over another user’s account in a custom plugin

    Technical Support
    2 3 80

    A
    2
    0

    I’m writing a NodeBB plugin and need to let User A inherit all of User B’s permissions, including:

    • Creating topics and replies on their behalf

    • Changing their password

    • Chatting as them

    • Editing or deleting their existing posts

    In other words, I want two linked accounts so that logging in as User A gives full control over User B’s account. What’s the best way to implement this in my plugin?

    I tried going through all the permission hooks but didn’t find anything suitable.

    Appreciate any help—thanks!

  • A
    2
    0

    julian
    I’m stuck halfway through creating a NodeBB plugin and could really use your expertise. I’m on a tight deadline and it’s quite urgent—would you be able to lend me a hand?

    Thank you very much for any assistance you can provide.

  • julian@community.nodebb.orgJ
    207
    0

    AMAARETS I think all you really need to do is have your plugin change req.session.uid and req.uid to the target uid.

    Although in practice there might be some cases I did not consider.