Skip to content

Commit

Permalink
Small additional methods for ACL
Browse files Browse the repository at this point in the history
  • Loading branch information
jypma committed Jan 9, 2017
1 parent 20f473b commit 8c434ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import sbtprotobuf.{ProtobufPlugin=>PB}
lazy val projectSettings = PB.protobufSettings ++ Seq(
licenses := Seq(("MIT", url("http://opensource.org/licenses/MIT"))),
organization := "com.tradeshift",
version := "0.0.19",
version := "0.0.20",
scalaVersion := "2.11.8",
publishMavenStyle := true,
javacOptions ++= Seq("-source", "1.8"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,11 @@ public boolean equals(Object obj) {
public int hashCode() {
return entries.hashCode();
}

/**
* Returns whether the ACL is empty, i.e. contains no entries at all.
*/
public boolean isEmpty() {
return entries.isEmpty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,11 @@ public Set<R> getRights(UUID userId, List<com.tradeshift.reaktive.protobuf.Types
}
return set;
}

/**
* Returns whether the ACL is empty, i.e. contains no entries at all.
*/
public boolean isEmpty() {
return userAcl.isEmpty() && groupAcl.isEmpty();
}
}

0 comments on commit 8c434ae

Please sign in to comment.