From 289a8423d53e269eaf0bff6308c7d911a83aeb2f Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 23 Jul 2013 09:17:10 +0000
Subject: [PATCH] Simplified if statements.
---
opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java b/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
index 2f3b958..78da5cf 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
@@ -391,8 +391,8 @@
baseName = toLowerCase(rawAttributeType);
}
- AttributeType attributeType;
- if ((attributeType = DirectoryServer.getAttributeType(baseName)) == null)
+ AttributeType attributeType = DirectoryServer.getAttributeType(baseName);
+ if (attributeType == null)
{
attributeType = DirectoryServer.getDefaultAttributeType(baseName);
}
@@ -435,14 +435,14 @@
public boolean isAllowed(ModifyDNOperation operation)
{
boolean ret = true;
- DN newSuperiorDN;
RDN oldRDN = operation.getOriginalEntry().getDN().getRDN();
RDN newRDN = operation.getNewRDN();
if (!skipAccessCheck(operation))
{
// If this is a modifyDN move to a new superior, then check if the
// superior DN has import access.
- if ((newSuperiorDN = operation.getNewSuperior()) != null)
+ final DN newSuperiorDN = operation.getNewSuperior();
+ if (newSuperiorDN != null)
{
try
{
@@ -536,17 +536,17 @@
public boolean mayProxy(Entry proxyUser, Entry proxiedUser,
Operation op)
{
- boolean ret = skipAccessCheck(proxyUser);
- if (!ret)
+ if (skipAccessCheck(proxyUser))
{
- AuthenticationInfo authInfo =
- new AuthenticationInfo(proxyUser, DirectoryServer
- .isRootDN(proxyUser.getDN()));
- AciContainer operationContainer =
- new AciLDAPOperationContainer(op, proxiedUser, authInfo, ACI_PROXY);
- ret = accessAllowedEntry(operationContainer);
+ return true;
}
- return ret;
+
+ final AuthenticationInfo authInfo =
+ new AuthenticationInfo(proxyUser, DirectoryServer.isRootDN(proxyUser
+ .getDN()));
+ final AciContainer operationContainer =
+ new AciLDAPOperationContainer(op, proxiedUser, authInfo, ACI_PROXY);
+ return accessAllowedEntry(operationContainer);
}
--
Gitblit v1.10.0