Please make sure to have a backup ready as we’re working on database layer. I’m not a member of the Zammad service team, just a regular IT admin, so you will be doing changes on your own risk.
Connect to your server using Putty and login as admin.
Access rails console by issuing command and find your user:
admin@ticket:~$ sudo zammad run rails c
[sudo] password for admin:
Loading production environment (Rails 6.1.7)
irb(main):001:0>
Find your user by login name (you could use lastname or email address to) and check that this is your user
irb(main):02:0> User.find_by(login: "enter your login name here")
=>
#<User:0x0000..........
id: 296,
organization_id: nil,
login: "your login name here",
firstname: "System",
lastname: "Administrator",
email: "system.administrator@email.de",
............
When you’re sure this is your user, issue following commands to add the user to Admin group only
irb(main):003:0> u = User.find_by(login: "enter your login name here")
=>
#<User:0x0000..........
...
irb(main):004:0> u.roles = Role.where(name: "Admin")
=>
[#<Role:0x0000..........
...
irb(main):005:0> u.save!
=> true
You now have administrative access only to Zammad.
That’s absolutely true. I thought I made this clear by “You now have administrative access only to Zammad” but I guess this might be read over quickly. Thanks for pointing this out.