permissions for Administrator accidentally removed

泄露秘密 提交于 2019-12-10 23:35:59

问题


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.


回答1:


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');


来源:https://stackoverflow.com/questions/34271997/permissions-for-administrator-accidentally-removed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!