Change owner in an organization

We are using LDAP authentication on our on-premise version 8.22. As a staff left the company and his email account was removed, would like to know how can I change the organization ownership from him to me?

There are a few ways:

  • You can create a new super user, outside of your LDAP system so this never happens again. For this, you simply run sentry createuser and create a new super user with some “manual” credentials.
  • You can “promote” an existing user to super user using sentry shell and then running something like from sentry.models import User; User.objects.filter(email='...').update(is_superuser=True).

If you opt for the latter, there are more things you can do but it requires you to have a short look at the models Sentry has.

To ensure a super user, you can pass --superuser flag to this command.

Thanks BYK,

I will try on the later suggestion first. In addition, where can I get more documentation on this setting?


This is an internal flag but the following lines explain what it is briefly:

If you know your way around Python and Django, you can try more at your own risk. This directory has all the models:

Many thanks.

1 Like