directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cp...@apache.org
Subject [38/43] directory-fortress-core git commit: Merge branch 'master' into feature/addPermAttrAndUserRoleConstraints
Date Thu, 06 Oct 2016 17:49:55 GMT
Merge branch 'master' into feature/addPermAttrAndUserRoleConstraints


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/e1d934e3
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/e1d934e3
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/e1d934e3

Branch: refs/heads/master
Commit: e1d934e3e01adc04ec30947fa4a3b685f30b5c1a
Parents: 4561ac4 1a7d04d
Author: clp207 <clp207@psu.edu>
Authored: Thu Sep 15 08:15:44 2016 -0400
Committer: clp207 <clp207@psu.edu>
Committed: Thu Sep 15 08:15:44 2016 -0400

----------------------------------------------------------------------
 README-CONFIG.md                                |   5 +-
 README-QUICKSTART-APACHEDS.md                   |  32 +--
 README-QUICKSTART-SLAPD.md                      |  32 +--
 README-TEN-MINUTE-GUIDE.md                      |   2 +-
 README.md                                       |   2 +-
 config/fortress.properties.src                  |   2 +-
 docker/run-tests.sh                             |   9 +
 ldap/schema/fortress.schema                     |   5 +-
 pom.xml                                         |  25 +--
 .../directory/fortress/core/GlobalIds.java      |   5 +
 .../directory/fortress/core/RestException.java  |   2 +-
 .../fortress/core/SecurityException.java        |   5 +-
 .../fortress/core/doc-files/apache-tomcat.html  |  18 +-
 .../fortress/core/impl/AdminMgrImpl.java        |   2 -
 .../directory/fortress/core/impl/GroupDAO.java  |   4 +
 .../fortress/core/impl/GroupMgrImpl.java        |  61 +++++-
 .../directory/fortress/core/impl/HierUtil.java  |  86 --------
 .../fortress/core/impl/OrgUnitDAO.java          |  18 ++
 .../directory/fortress/core/impl/PermDAO.java   |  17 +-
 .../fortress/core/impl/ReviewMgrImpl.java       |   9 +-
 .../directory/fortress/core/impl/RoleDAO.java   |   2 +-
 .../core/ldap/LdapConnectionProvider.java       | 196 ++++++++++++-------
 .../directory/fortress/core/ldap/LdapUtil.java  | 175 ++++++++++++-----
 .../fortress/core/model/AdminRole.java          |   2 +-
 .../core/model/AdminRoleRelationship.java       |   2 +-
 .../fortress/core/model/FortRequest.java        |   2 +-
 .../fortress/core/model/FortResponse.java       |   2 +-
 .../directory/fortress/core/model/Group.java    |  81 +++++++-
 .../directory/fortress/core/model/Hier.java     |   2 +-
 .../directory/fortress/core/model/OrgUnit.java  |   2 +-
 .../core/model/OrgUnitRelationship.java         |   2 +-
 .../fortress/core/model/PermGrant.java          |   2 +-
 .../directory/fortress/core/model/PermObj.java  |   6 +-
 .../fortress/core/model/Permission.java         |   4 +-
 .../directory/fortress/core/model/Props.java    |   2 +-
 .../directory/fortress/core/model/Role.java     |  33 +++-
 .../directory/fortress/core/model/RolePerm.java |   2 +-
 .../fortress/core/model/RoleRelationship.java   |   2 +-
 .../directory/fortress/core/model/User.java     |   6 +-
 .../fortress/core/rest/AccessMgrRestImpl.java   |   2 +-
 .../fortress/core/rest/AdminMgrRestImpl.java    |   2 +-
 .../fortress/core/rest/AuditMgrRestImpl.java    |   2 +-
 .../fortress/core/rest/ConfigMgrRestImpl.java   |   2 +-
 .../core/rest/DelAccessMgrRestImpl.java         |   2 +-
 .../fortress/core/rest/DelAdminMgrRestImpl.java |   2 +-
 .../core/rest/DelReviewMgrRestImpl.java         |   2 +-
 .../directory/fortress/core/rest/HttpIds.java   |   2 +-
 .../fortress/core/rest/PwPolicyMgrRestImpl.java |   2 +-
 .../directory/fortress/core/rest/RestUtils.java |  11 +-
 .../fortress/core/rest/ReviewMgrRestImpl.java   |   2 +-
 .../directory/fortress/core/rest/package.html   |   2 +-
 .../fortress/core/GroupMgrConsole.java          |  25 ++-
 52 files changed, 580 insertions(+), 344 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/e1d934e3/ldap/schema/fortress.schema
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/e1d934e3/src/main/java/org/apache/directory/fortress/core/GlobalIds.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/e1d934e3/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/e1d934e3/src/main/java/org/apache/directory/fortress/core/impl/PermDAO.java
----------------------------------------------------------------------
diff --cc src/main/java/org/apache/directory/fortress/core/impl/PermDAO.java
index 623dbec,f2a7eeb..5788c61
--- a/src/main/java/org/apache/directory/fortress/core/impl/PermDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/PermDAO.java
@@@ -161,12 -158,9 +161,11 @@@ final class PermDAO extends LdapDataPro
        *  **  OpenAccessMgr PERMISSION STATICS
        *  ************************************************************************
        */
-     private static final String TYPE = "ftType";
      private static final String PERM_OBJ_OBJECT_CLASS_NAME = "ftObject";
      private static final String PERM_OP_OBJECT_CLASS_NAME = "ftOperation";
 -
 +    private static final String PERMISSION_ATTRIBUTE_SET_OBJECT_CLASS_NAME = "ftAttributeSet";
 +    private static final String PERMISSION_ATTRIBUTE_OBJECT_CLASS_NAME = "ftAttribute";
 +    
      private static final String PERM_OBJ_OBJ_CLASS[] =
          {
              SchemaConstants.TOP_OC,
@@@ -198,37 -191,17 +197,37 @@@
              SchemaConstants.DESCRIPTION_AT,
              SchemaConstants.OU_AT,
              GlobalIds.POBJ_ID,
-             TYPE,
+             GlobalIds.TYPE,
              ROLES,
              USERS,
 -            GlobalIds.PROPS
 +            GlobalIds.PROPS,
 +            PERMISSION_ATTRIBUTE_SET
      };
  
      private static final String[] PERMISION_OBJ_ATRS =
          {
-             GlobalIds.FT_IID, GlobalIds.POBJ_NAME, SchemaConstants.DESCRIPTION_AT, SchemaConstants.OU_AT,
TYPE,
+             GlobalIds.FT_IID, GlobalIds.POBJ_NAME, SchemaConstants.DESCRIPTION_AT, SchemaConstants.OU_AT,
GlobalIds.TYPE,
              GlobalIds.PROPS
      };
 +    
 +    private static final String[] PERMISION_ATTRIBUTE_SET_ATRS =
 +    {
 +        GlobalIds.FT_IID, SchemaConstants.DESCRIPTION_AT, SchemaConstants.CN_AT, GlobalIds.FT_PERMISSION_ATTRIBUTE_SET_TYPE
 +    };
 +    
 +    private static final String[] PERMISION_ATTRIBUTE_ATRS =
 +    {
 +        GlobalIds.FT_IID, 
 +        GlobalIds.FT_PERMISSION_ATTRIBUTE, 
 +        SchemaConstants.DESCRIPTION_AT, 
 +        SchemaConstants.CN_AT, 
 +        GlobalIds.FT_PERMISSION_ATTRIBUTE_SET,
 +        GlobalIds.FT_PERMISSION_ATTRIBUTE_DATA_TYPE,
 +        GlobalIds.FT_PERMISSION_ATTRIBUTE_DEFAULT_OPERATOR,
 +        GlobalIds.FT_PERMISSION_ATTRIBUTE_DEFAULT_STRATEGY,
 +        GlobalIds.FT_PERMISSION_ATTRIBUTE_DEFAULT_VALUE,
 +        GlobalIds.FT_PERMISSION_ATTRIBUTE_VALID_VALUES
 +    };
  
      public PermDAO(){
          super();
@@@ -441,9 -414,9 +440,9 @@@
              // type is optional:
              if ( StringUtils.isNotEmpty( entity.getType() ) )
              {
-                 entry.add( TYPE, entity.getType() );
+                 entry.add( GlobalIds.TYPE, entity.getType() );
              }
 -
 +            
              // These are multi-valued attributes, use the util function to load:
              // These items are optional as well.  The utility function will return quietly
if no items are loaded into collection:
              loadAttrs( entity.getRoles(), entry, ROLES );
@@@ -724,16 -482,8 +723,16 @@@
              {
  
                  mods.add( new DefaultModification(
-                     ModificationOperation.REPLACE_ATTRIBUTE, TYPE, entity.getType() ) );
+                     ModificationOperation.REPLACE_ATTRIBUTE, GlobalIds.TYPE, entity.getType()
) );
              }
 +            
 +            if ( CollectionUtils.isNotEmpty( entity.getPaSets() ) )
 +            {
 +                for(String paSetName : entity.getPaSets() ){
 +                    mods.add( new DefaultModification(
 +                        ModificationOperation.REPLACE_ATTRIBUTE, PERMISSION_ATTRIBUTE_SET,
paSetName ) );
 +                }
 +            }
  
              // These are multi-valued attributes, use the util function to load:
              loadAttrs( entity.getRoles(), mods, ROLES );
@@@ -1415,11 -1025,10 +1414,11 @@@
          entity.setInternalId( getAttribute( le, GlobalIds.FT_IID ) );
          entity.setRoles( getAttributeSet( le, ROLES ) );
          entity.setUsers( getAttributeSet( le, USERS ) );
-         entity.setType( getAttribute( le, TYPE ) );
+         entity.setType( getAttribute( le, GlobalIds.TYPE ) );
          entity.setDescription( getAttribute( le, SchemaConstants.DESCRIPTION_AT ) );
 -        entity.addProperties( PropUtil.getProperties( getAttributes( le, GlobalIds.PROPS
) ) );
 +        entity.addProperties( PropUtil.getProperties( getAttributes( le, GlobalIds.PROPS
) ) );        
          entity.setAdmin( isAdmin );
 +        entity.setPaSets( getAttributeSet(le, GlobalIds.FT_PERMISSION_ATTRIBUTE_SET ) );
  
          if ( le != null )
          {

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/e1d934e3/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/e1d934e3/src/main/java/org/apache/directory/fortress/core/model/Permission.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/e1d934e3/src/main/java/org/apache/directory/fortress/core/rest/AdminMgrRestImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/e1d934e3/src/main/java/org/apache/directory/fortress/core/rest/ReviewMgrRestImpl.java
----------------------------------------------------------------------


Mime
View raw message