Skip to content
Browse files
Backward compatibility is preventing the View.READ permission to apply
correctly. It actually overrides the View.READ instead of complementing

This change only applies default READ right if the View.READ is not
available, and the user has View.CONFIGURE + the view is not empty.
  • Loading branch information
Vlatombe authored and kohsuke committed May 23, 2012
1 parent 2128c9d commit d1b2ba7e4988d26fbb815b8912efb16273c407d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
@@ -57,6 +57,9 @@
<ul class=image>
<li class=bug>
Fixed a possible race condition
<li class=bug>
Fixed nested view not showing up with just read perm for View
(<a href="">issue 13429</a>)
<li class=rfe>
Improve the low disk space warning message.
(<a href="">issue 13826</a>)
@@ -99,11 +99,12 @@ public ACL getACL(final View item) {
public boolean hasPermission(Authentication a, Permission permission) {
ACL base = item.getOwner().getACL();

if (permission==View.READ) {
boolean hasPermission = base.hasPermission(a, permission);
if (!hasPermission && permission == View.READ) {
return base.hasPermission(a,View.CONFIGURE) || !item.getItems().isEmpty();

return base.hasPermission(a, permission);
return hasPermission;

0 comments on commit d1b2ba7

Please sign in to comment.