directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-core git commit: FC-133 - Change audit flags
Date Tue, 09 Feb 2016 22:57:14 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master df91b2a1c -> b08bdc132


FC-133 - Change audit flags


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/b08bdc13
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/b08bdc13
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/b08bdc13

Branch: refs/heads/master
Commit: b08bdc13281d62b59dba98b38ef9654f6370e704
Parents: df91b2a
Author: Shawn McKinney <smckinney@apache.org>
Authored: Tue Feb 9 06:39:08 2016 -0600
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Tue Feb 9 06:39:08 2016 -0600

----------------------------------------------------------------------
 ldap/slapd.conf.src                                       |  2 +-
 .../org/apache/directory/fortress/core/impl/UserDAO.java  | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/b08bdc13/ldap/slapd.conf.src
----------------------------------------------------------------------
diff --git a/ldap/slapd.conf.src b/ldap/slapd.conf.src
index 54bf681..970cb25 100755
--- a/ldap/slapd.conf.src
+++ b/ldap/slapd.conf.src
@@ -28,7 +28,7 @@ include		@SCHEMA_PATH@/inetorgperson.schema
 include		@SCHEMA_PATH@/nis.schema
 include		@SCHEMA_PATH@/openldap.schema
 include		@SCHEMA_PATH@/fortress.schema
-include		@SCHEMA_PATH@/rbac.schema
+@IS_RBAC_ACCELERATOR@include		@SCHEMA_PATH@/rbac.schema
 
 ### SSL Configuration
 @IS_SSL@TLSCACertificateFile @CA_CERT_FILEW@

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/b08bdc13/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java b/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java
index 7da42ea..c5b7bc3 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/UserDAO.java
@@ -1691,6 +1691,7 @@ final class UserDAO extends ApacheDsDataProvider
 
         try
         {
+            // Perform this operation as the end user to allow password policy checking:
             ld = getUserConnection();
             bind( ld, userDn, entity.getPassword() );
             mods = new ArrayList<Modification>();
@@ -1698,14 +1699,13 @@ final class UserDAO extends ApacheDsDataProvider
             mods.add( new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, SchemaConstants
                 .USER_PASSWORD_AT, new String( newPassword ) ) );
 
+            // This modify changes the password and checks password policies (if enabled)
             modify( ld, userDn, mods );
 
-            // The 2nd modify is to update audit attributes on the User entry:
-            if ( !GlobalIds.IS_AUDIT_DISABLED && ( entity.getAdminSession() != null
) )
+            // This modify update audit attributes on the User entry (if enabled):
+            if ( GlobalIds.IS_OPENLDAP && ! GlobalIds.IS_AUDIT_DISABLED )
             {
-                // Because the user modified their own password, set their userId here:
-                //(entity.getAdminSession()).setInternalUserId(entity.getUserId());
-                mods = new ArrayList<Modification>();
+                mods = new ArrayList<>();
                 modify( ld, userDn, mods, entity );
             }
         }


Mime
View raw message