directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cp...@apache.org
Subject [2/2] directory-fortress-core git commit: Merge branch 'master' of http://git-wip-us.apache.org/repos/asf/directory-fortress-core
Date Fri, 07 Oct 2016 12:30:33 GMT
Merge branch 'master' of http://git-wip-us.apache.org/repos/asf/directory-fortress-core


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

Branch: refs/heads/master
Commit: bf5aa384bd70b36f280fb9898229fbb51ae735f2
Parents: cdd2acf 63c04db
Author: clp207 <clp207@psu.edu>
Authored: Fri Oct 7 08:10:46 2016 -0400
Committer: clp207 <clp207@psu.edu>
Committed: Fri Oct 7 08:10:46 2016 -0400

----------------------------------------------------------------------
 .../directory/fortress/core/GlobalErrIds.java   |  11 +
 .../directory/fortress/core/ReviewMgr.java      |   5 +-
 .../fortress/core/impl/AdminMgrImpl.java        |   4 +
 .../fortress/core/impl/GroupMgrImpl.java        |  20 +-
 .../directory/fortress/core/impl/GroupP.java    |   1 +
 .../directory/fortress/core/impl/PermDAO.java   |   4 +-
 .../directory/fortress/core/impl/PermP.java     |  17 +-
 .../fortress/core/impl/ReviewMgrImpl.java       |   6 +-
 .../directory/fortress/core/impl/UserP.java     |  33 ++-
 .../fortress/core/model/FortRequest.java        |  28 ++-
 .../fortress/core/model/ObjectFactory.java      |  55 +++++
 .../core/model/PermissionAttribute.java         |  90 +++++---
 .../core/model/PermissionAttributeSet.java      |  75 ++++---
 .../fortress/core/model/RoleConstraint.java     |  85 ++++++--
 .../fortress/core/model/RoleConstraintType.java |  30 ---
 .../directory/fortress/core/model/UserRole.java |   3 +-
 .../fortress/core/rest/AdminMgrRestImpl.java    | 206 ++++++++++++++++---
 .../directory/fortress/core/rest/HttpIds.java   |   9 +
 .../fortress/core/rest/ReviewMgrRestImpl.java   |  71 ++++++-
 .../directory/fortress/core/util/VUtil.java     |  20 --
 .../fortress/core/impl/ReviewMgrImplTest.java   |   9 +-
 .../fortress/core/impl/URATestData.java         |   3 +-
 22 files changed, 579 insertions(+), 206 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/bf5aa384/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
----------------------------------------------------------------------
diff --cc src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
index 0eaf85c,2258419..5c62899
--- a/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
@@@ -353,12 -353,14 +353,14 @@@ public final class AdminMgrImpl extend
      @Override
      public RoleConstraint addRoleConstraint( UserRole uRole, RoleConstraint roleConstraint
)
      	   	throws SecurityException
 -    {
 -        //TODO: need new arbac perm and/or add security check
 +    {        
      	String methodName = "assignUser";
          assertContext( CLS_NM, methodName, uRole, GlobalErrIds.URLE_NULL );
 +        AdminUtil.canAssign( uRole.getAdminSession(), new User( uRole.getUserId() ), new
Role( uRole.getName() ), contextId );
++
+         // todo assert roleconstraint here
          
 -        userP.assign( uRole, roleConstraint );
 -        
 +        userP.assign( uRole, roleConstraint );        
          return roleConstraint;
      }
  
@@@ -368,11 -370,12 +370,13 @@@
      @Override
      public void removeRoleConstraint( UserRole uRole, RoleConstraint roleConstraint )
          	throws SecurityException
 -    {
 -        //TODO: need new arbac perm and/or add security check
 +    {        
      	String methodName = "assignUser";
          assertContext( CLS_NM, methodName, uRole, GlobalErrIds.URLE_NULL );
 +        AdminUtil.canDeassign( uRole.getAdminSession(), new User( uRole.getUserId() ), new
Role( uRole.getName() ), contextId );
 +        
+         // todo assert roleconstraint here
+ 
          userP.deassign( uRole, roleConstraint );    	
      }
      


Mime
View raw message