This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit c3d8fdfcc6fab90ffefe14e87089de3c1d0c98a8 Merge: 84d2cb6228 b342549f8f Author: Christopher Tubbs <ctubb...@apache.org> AuthorDate: Wed Jun 11 15:12:37 2025 -0400 Merge commit 'b342549f8f424a08e0c46ca111b81f54fa3d19e3' Clean merge of #5593 from 2.1 .../namespace/create/SetupNamespacePermissions.java | 16 +++++++++------- .../apache/accumulo/test/NamespacesIT_SimpleSuite.java | 7 +++++++ .../java/org/apache/accumulo/test/TableOperationsIT.java | 12 ++++++++++++ 3 files changed, 28 insertions(+), 7 deletions(-) diff --cc server/manager/src/main/java/org/apache/accumulo/manager/tableOps/namespace/create/SetupNamespacePermissions.java index 183438535e,6f7025e9aa..95b9b7ba3d --- a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/namespace/create/SetupNamespacePermissions.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/namespace/create/SetupNamespacePermissions.java @@@ -37,16 -36,18 +37,18 @@@ class SetupNamespacePermissions extend } @Override - public Repo<Manager> call(long tid, Manager env) throws Exception { + public Repo<Manager> call(FateId fate, Manager env) throws Exception { // give all namespace permissions to the creator var security = env.getContext().getSecurityOperation(); - for (var permission : NamespacePermission.values()) { - try { - security.grantNamespacePermission(env.getContext().rpcCreds(), namespaceInfo.user, - namespaceInfo.namespaceId, permission); - } catch (ThriftSecurityException e) { - LoggerFactory.getLogger(SetupNamespacePermissions.class).error("{}", e.getMessage(), e); - throw e; + if (!namespaceInfo.user.equals(env.getContext().getCredentials().getPrincipal())) { + for (var permission : NamespacePermission.values()) { + try { + security.grantNamespacePermission(env.getContext().rpcCreds(), namespaceInfo.user, + namespaceInfo.namespaceId, permission); + } catch (ThriftSecurityException e) { + LoggerFactory.getLogger(SetupNamespacePermissions.class).error("{}", e.getMessage(), e); + throw e; + } } }