vi editor replace all

The syntax for replacing one string with another string in the current line is

:s/pattern/replace/

Here “pattern” represents the old string and “replace” represents the new string. For example, to replace each occurrence of the word “lemon” in a line with “orange,” type:

:s/phpcode/phpcodez/

The syntax for replacing every occurrence of a string in the entire text is similar. The only difference is the addition of a “%” in front of the “s”:

:%s/pattern/replace/

Thus repeating the previous example for the entire text instead of just for a single line would be:

:%s/phpcode/phpcodez/

We can’t find the role for the user you wanted.

Edit the file vendor/magento/module-authorization/Model/Acl/AclRetriever.php at line# 85 and replace the below code

   if (!$role) {
throw new AuthorizationException(
__('We can\'t find the role for the user you wanted.')
);
}
$allowedResources = $this->getAllowedResourcesByRole($role->getId());

With this one

if (!$role) {
            $allowedResources = array();
        }

Once success, please revert back the file.