From 8c434ae46154f26eaa64df52a2e049c0feb51039 Mon Sep 17 00:00:00 2001 From: Jan Ypma Date: Mon, 9 Jan 2017 15:53:01 +0100 Subject: [PATCH] Small additional methods for ACL --- build.sbt | 2 +- .../main/java/com/tradeshift/reaktive/actors/acl/ACL.java | 7 +++++++ .../com/tradeshift/reaktive/actors/acl/GroupedUserACL.java | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6022c76e..7ab80e41 100644 --- a/build.sbt +++ b/build.sbt @@ -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"), diff --git a/ts-reaktive-actors/src/main/java/com/tradeshift/reaktive/actors/acl/ACL.java b/ts-reaktive-actors/src/main/java/com/tradeshift/reaktive/actors/acl/ACL.java index 76e1f1b9..f8f57569 100644 --- a/ts-reaktive-actors/src/main/java/com/tradeshift/reaktive/actors/acl/ACL.java +++ b/ts-reaktive-actors/src/main/java/com/tradeshift/reaktive/actors/acl/ACL.java @@ -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(); + } } diff --git a/ts-reaktive-actors/src/main/java/com/tradeshift/reaktive/actors/acl/GroupedUserACL.java b/ts-reaktive-actors/src/main/java/com/tradeshift/reaktive/actors/acl/GroupedUserACL.java index fce6ca2f..fd4fb15a 100644 --- a/ts-reaktive-actors/src/main/java/com/tradeshift/reaktive/actors/acl/GroupedUserACL.java +++ b/ts-reaktive-actors/src/main/java/com/tradeshift/reaktive/actors/acl/GroupedUserACL.java @@ -92,4 +92,11 @@ public Set getRights(UUID userId, List