浏览代码

HUE-3925 [sentry] New privilege from the Roles section are not blank

Enrico Berti 9 年之前
父节点
当前提交
040f2ee
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apps/security/src/security/static/security/js/sentry.ko.js

+ 1 - 1
apps/security/src/security/static/security/js/sentry.ko.js

@@ -271,7 +271,7 @@ var Role = function (vm, role) {
 
   self.addPrivilege = function () {
     var privilege = new Privilege(vm, {'serverName': vm.assist.server(), 'status': 'new', 'editing': true});
-    if (vm.assist.path()) {
+    if (vm.assist.path() && vm.getSectionHash() == 'edit') {
       privilege.path(vm.assist.path());
     }
     self.privileges.push(privilege);