question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG whoami returning "admin_for" and "ta_for" which do not match for superusers

See original GitHub issue

From /api/public/auth/whoami for me (I am a superuser):

{
  "data": {
    "context": {
      "id": "...",
      "name": "Intro to OS"
    },
    "status": null,
    "user": {
      "admin_for": [
        {
          "id": "...",
          "name": "OOP"
        },
        {
          "id": "...",
          "name": "Intro to OS"
        }
      ],
      "github_username": "wabscale",
      "id": "...",
      "is_admin": true,
      "is_superuser": true,
      "name": "John Cunniff",
      "netid": "jmc1283",
      "professor_for": [],
      "ta_for": [
        {
          "id": "...",
          "name": "Intro to OS"
        }
      ]
    },
    "variant": "warning"
  },
  "error": null,
  "success": true
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
AlpacaMaxcommented, Jul 2, 2021

I see. Looks like a pretty straight forward task. I’ll take this one and work on it this weekend.

0reactions
AlpacaMaxcommented, Jul 3, 2021

Never mind. Apparently sqlalchemy doesn’t have a workaround on cyclic association. I misremembered that with Django.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'who am i' and 'who -m' do not return results as expected
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 Description of problem: Problems with 'who' command. who ...
Read more >
When in OMVS and issuing the su command to gain ...
Answer: The OMVS SU command without additional parameters is used to change the user from an ordinary user to a superuser. The WHOAMI...
Read more >
Why does "sudo -u root echo `whoami`" not return root?
sudo echo `whoami`. Returns your name because whoami changes to your username before sudo runs. It's like: sudo echo myname. you can see...
Read more >
current user and env user do not match when executing a ...
whoami prints the effective user id. When you start Apache, I guess you do it using the root user, or with some sudo...
Read more >
`who am i` after `su` not showing new user id?
whoami is mean to show you what the effective user id is of the person running it. It returns just a single name,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found