Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Technical Support
  3. Grant one user full control over another user’s account in a custom plugin

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

Scheduled Pinned Locked Moved Technical Support
4 Posts 2 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A This user is from outside of this forum
    A This user is from outside of this forum
    [email protected]
    wrote last edited by
    #1

    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!

    1 Reply Last reply
    0
    • A This user is from outside of this forum
      A This user is from outside of this forum
      [email protected]
      wrote last edited by
      #2

      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.

      1 Reply Last reply
      0
      • julian@community.nodebb.orgJ This user is from outside of this forum
        julian@community.nodebb.orgJ This user is from outside of this forum
        [email protected]
        wrote last edited by
        #3

        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.

        1 Reply Last reply
        1
        • A This user is from outside of this forum
          A This user is from outside of this forum
          [email protected]
          wrote last edited by
          #4

          julian
          I also need User A to be able to edit User B’s existing posts and chat messages. How can I implement that?
          Maybe after all there’s a way to directly set permissions for all actions a user can perform?

          Thanks!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups