未验证 提交 7777d8f2 编写于 作者: D Daniel Beck 提交者: GitHub

Do not show disabled permissions in permission errors (#4482)

上级 9c4dac70
......@@ -69,8 +69,12 @@ public abstract class ACL {
if (a == SYSTEM) {
return;
}
if(!hasPermission(a,p))
if (!hasPermission(a,p)) {
while (!p.enabled && p.impliedBy != null) {
p = p.impliedBy;
}
throw new AccessDeniedException2(a,p);
}
}
/**
......
......@@ -60,7 +60,7 @@ public class GetNodeCommandTest {
.invokeWithArgs("MySlave")
;
assertThat(result.stderr(), containsString("ERROR: user is missing the Agent/ExtendedRead permission"));
assertThat(result.stderr(), containsString("ERROR: user is missing the Agent/Configure permission"));
assertThat(result, failedWith(6));
assertThat(result, hasNoStandardOutput());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册