janhoy commented on code in PR #4800:
URL: https://github.com/apache/solr/pull/4800#discussion_r3838918528
##########
solr/webapp/web/js/angular/controllers/security.js:
##########
@@ -777,10 +828,11 @@ solrAdminApp.controller('SecurityController', function
($scope, $timeout, $cooki
return;
}
$scope.togglePermDialog();
- // avoids a weird race with not getting the latest config after an
update
- Security.get({path: "authorization"}, function (ignore) {
- $scope.refreshSecurityPanel();
- });
+ whenReflected("authorization", function (data2) {
+ var have = permissionRoles(data2, setPermJson.name);
+ var want = asList(setPermJson.role);
+ return have != null && have.length === want.length && want.every(r
=> have.includes(r));
+ }, $scope.refreshSecurityPanel);
Review Comment:
Good catch — the two "extra GET" blocks differed in indentation, so the
replacement only hit the index-reposition branch. Fixed in 9c0e1dbc423: the
plain add/update-permission path now also waits via whenReflected with the same
permissionRoles/role-list check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]