All user permissions changed to Read-only, need help

One of our Super Users accidentally ran a codeunit that changed all of our permission, including admins and superusers to Read-only. What can I do to undo this change? We are on Nav 3.7 and are using MS Sql 2000.

This is one that you should contact your partner about. They can help you immediately.

There is no undo. Load a recent backup. Copy the data from the security tables (Windows Login, Windows Access Control, Database Login, Member Of) in the backup to the production database.

Thanks for the reply. I actually was able to change my permission back by using the session that had made the change and had not been closed. Once I was able to get back in I just copied the Windows Access Control table from a test system we had in place. Then proceeded to delete the codeunit that caused the problem to begin with.

That super-user - is he or still a super-user? [;)]

Otherwise - when doing code like that, and letting it stay there “wide-open”, it may cause problems! Either by other super-users or even by yourself. [:$]
Usually I initiate my “critical codes” with “IF USERID <> ‘MyUsreId’ THEN ERROR(‘Not allowed.’);” and I deliberately misspell the userid! Then even I myself cannot run the code unintentionally! When the code has to be used, this misspell is corrected. And then returned afterwards.