From 6f8fecae4b7d12fb8f51d114b8eb297e604d7dc7 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 27 Apr 2016 16:12:11 +0100 Subject: [PATCH] RM-3344 Ensure we are not downgrading admin or upgrading guest. This is a first pass at preventing changes to the clearance of admin or guest. Previously we weren't allowing any changes to their clearance, but when working with security markings, admin in particular needs to occasionally gain a new mark when a custom group is created. Currently that clearing is not happening, but this change does not prevent it, if needed. Also remove an unused method from the CaveatMarkingServiceImpl, as the class is already very full. --- .../util/AuthenticationUtil.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/util/AuthenticationUtil.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/util/AuthenticationUtil.java index c7f2c4a3dd..0569450e32 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/util/AuthenticationUtil.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/util/AuthenticationUtil.java @@ -98,6 +98,16 @@ public class AuthenticationUtil return org.alfresco.repo.security.authentication.AuthenticationUtil.getSystemUserName(); } + /** + * Helper method that gets the guest user name. + * + * @see org.alfresco.repo.security.authentication.AuthenticationUtil#getGuestUserName() + */ + public String getGuestUserName() + { + return org.alfresco.repo.security.authentication.AuthenticationUtil.getGuestUserName(); + } + /** * @see org.alfresco.repo.security.authentication.AuthenticationUtil#isRunAsUserTheSystemUser() */