permissions for Administrator accidentally removed

2019-07-09 04:36发布

While trying to cleanup a Sonar instance from unwanted users/permissions it seems that the permissions for the Administrator have been withdrawn. We can no longer see the settings menu item (normally appears next to the Administrators login link), cannot change alerts any more ... I have spent a couple of hours now trying to find out where in the DB these permissions reside and hoping to put them back using some insert statements in the DB.

Can someone explain how to put this back? I can login with the Administrator but that is all, no more administrator permissions.

标签: sonarqube
1条回答
走好不送
2楼-- · 2019-07-09 04:53

This happens often enough that a FAQ section has been created for it. You'll have to fix it at the database level:

INSERT INTO user_roles(user_id, role) VALUES ((select id from users where login='mylogin'), 'admin');
查看更多
登录 后发表回答