From b6106cffafc89a9c3051c3196f54df643197e4ad Mon Sep 17 00:00:00 2001 From: Sean Hassan Date: Thu, 21 May 2020 16:22:11 -0500 Subject: Enable Organizations to have a subset of users the user roles of which do not expire Issue-ID: AAF-1149 Signed-off-by: Sean Hassan Change-Id: Iaf04456abe78f2cb7972587b50f00bcaac3f83aa --- .../src/main/java/org/onap/aaf/auth/org/Organization.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'auth/auth-core') diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/Organization.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/Organization.java index f34ed151..795231eb 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/Organization.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/Organization.java @@ -348,6 +348,16 @@ public interface Organization { public void setTestMode(boolean dryRun); + /** + * Evaluates a user to determine if they are exempt from role expiration. + * Returns true if true, false is false. Default implementation is always false. + * + * @param user + * @param expires + * @return + */ + public boolean isUserExpireExempt(String user, Date expires); + public static final Organization NULL = new Organization() { private final GregorianCalendar gc = new GregorianCalendar(1900, 1, 1); @@ -586,6 +596,11 @@ public interface Organization { return null; } + @Override + public boolean isUserExpireExempt(String user, Date expires) { + return false; + } + }; } -- cgit 1.2.3-korg