You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by cp...@apache.org on 2016/03/21 15:13:19 UTC

directory-fortress-core git commit: fixed method name in findPermission(permObj) method

Repository: directory-fortress-core
Updated Branches:
  refs/heads/master ff50d8f1e -> d14990b69


fixed method name in findPermission(permObj) method


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

Branch: refs/heads/master
Commit: d14990b69e2181ef46ba7692c7e98f6ae6307914
Parents: ff50d8f
Author: clp207 <cl...@psu.edu>
Authored: Mon Mar 21 10:13:06 2016 -0400
Committer: clp207 <cl...@psu.edu>
Committed: Mon Mar 21 10:13:06 2016 -0400

----------------------------------------------------------------------
 .../org/apache/directory/fortress/core/impl/ReviewMgrImpl.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d14990b6/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
index 0b04f28..83dc671 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
@@ -133,7 +133,7 @@ public class ReviewMgrImpl extends Manageable implements ReviewMgr, Serializable
 	@Override
 	public List<Permission> findPermissions(PermObj permObj)
 			throws SecurityException {
-        String methodName = "findObjPermissions";
+        String methodName = "findPermissions";
         assertContext( CLS_NM, methodName, permObj, GlobalErrIds.PERM_OBJECT_NULL );
         VUtil.assertNotNullOrEmpty(permObj.getObjName(), GlobalErrIds.PERM_OBJECT_NM_NULL, CLS_NM + "." + methodName);
         checkAccess(CLS_NM, methodName);


Re: directory-fortress-core git commit: fixed method name in findPermission(permObj) method

Posted by Shawn McKinney <sm...@apache.org>.
> On Mar 22, 2016, at 8:11 AM, Shawn McKinney <sm...@apache.org> wrote:
> 
>> 
>> On Mar 22, 2016, at 7:24 AM, Chris Pike <cl...@psu.edu> wrote:
>> 
>> Having a method name field / arbac permission that doesn't match the actual method name is confusing. What about changing the method to findPermissionsByPermObj?
> 
> Agreed.  I’d favor a shorter one, findPermsByObj.  These methods names mimic those in the incits 359 func specs.  But this one is new, added lately by you, which means you pick the name this time.  :-)  

Just committed changes to this method name in core and rest.

Shawn

Re: directory-fortress-core git commit: fixed method name in findPermission(permObj) method

Posted by Shawn McKinney <sm...@apache.org>.
> On Mar 22, 2016, at 7:24 AM, Chris Pike <cl...@psu.edu> wrote:
> 
> Having a method name field / arbac permission that doesn't match the actual method name is confusing. What about changing the method to findPermissionsByPermObj?

Agreed.  I’d favor a shorter one, findPermsByObj.  These methods names mimic those in the incits 359 func specs.  But this one is new, added lately by you, which means you pick the name this time.  :-)  

Shawn

Re: directory-fortress-core git commit: fixed method name in findPermission(permObj) method

Posted by Chris Pike <cl...@psu.edu>.
Having a method name field / arbac permission that doesn't match the actual method name is confusing. What about changing the method to findPermissionsByPermObj?


----- Original Message -----
From: "Shawn McKinney" <sm...@apache.org>
To: fortress@directory.apache.org
Sent: Monday, March 21, 2016 10:48:59 PM
Subject: Fwd: directory-fortress-core git commit: fixed method name in findPermission(permObj) method

Chris,

Can you explain the rationale of changing this method label name?  

	@Override
	public List<Permission> findPermissions(PermObj permObj)
			throws SecurityException {
        String methodName = "findPermissions”;

As a convention every method has a unique label (even the overloaded ones) in order to control them via ARBAC permissions.  For this method, we have this corresponding permission that is loaded:
                <permgrant objName="org.apache.directory.fortress.core.impl.ReviewMgrImpl" opName="findPermObjs" roleNm="fortress-core-super-admin" admin="true”/>

By changing the name we can no longer differentiate between that one and this one:
    public List<Permission> findPermissions(Permission permission)
        throws SecurityException
    {
        String methodName = "findPermissions”;

Please advise,

Shawn

> Begin forwarded message:
> 
> Reply-To: dev@directory.apache.org
> From: cpike@apache.org
> To: commits@directory.apache.org
> Subject: directory-fortress-core git commit: fixed method name in findPermission(permObj) method
> Date: March 21, 2016 at 9:13:19 AM CDT
> 
> Repository: directory-fortress-core
> Updated Branches:
>  refs/heads/master ff50d8f1e -> d14990b69
> 
> 
> fixed method name in findPermission(permObj) method
> 
> 
> 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/d14990b6
> Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/d14990b6
> Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/d14990b6
> 
> Branch: refs/heads/master
> Commit: d14990b69e2181ef46ba7692c7e98f6ae6307914
> Parents: ff50d8f
> Author: clp207 <cl...@psu.edu>
> Authored: Mon Mar 21 10:13:06 2016 -0400
> Committer: clp207 <cl...@psu.edu>
> Committed: Mon Mar 21 10:13:06 2016 -0400
> 
> ----------------------------------------------------------------------
> .../org/apache/directory/fortress/core/impl/ReviewMgrImpl.java     | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d14990b6/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
> ----------------------------------------------------------------------
> diff --git a/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
> index 0b04f28..83dc671 100755
> --- a/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
> +++ b/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
> @@ -133,7 +133,7 @@ public class ReviewMgrImpl extends Manageable implements ReviewMgr, Serializable
> 	@Override
> 	public List<Permission> findPermissions(PermObj permObj)
> 			throws SecurityException {
> -        String methodName = "findObjPermissions";
> +        String methodName = "findPermissions";
>         assertContext( CLS_NM, methodName, permObj, GlobalErrIds.PERM_OBJECT_NULL );
>         VUtil.assertNotNullOrEmpty(permObj.getObjName(), GlobalErrIds.PERM_OBJECT_NM_NULL, CLS_NM + "." + methodName);
>         checkAccess(CLS_NM, methodName);
>

Fwd: directory-fortress-core git commit: fixed method name in findPermission(permObj) method

Posted by Shawn McKinney <sm...@apache.org>.
Chris,

Can you explain the rationale of changing this method label name?  

	@Override
	public List<Permission> findPermissions(PermObj permObj)
			throws SecurityException {
        String methodName = "findPermissions”;

As a convention every method has a unique label (even the overloaded ones) in order to control them via ARBAC permissions.  For this method, we have this corresponding permission that is loaded:
                <permgrant objName="org.apache.directory.fortress.core.impl.ReviewMgrImpl" opName="findPermObjs" roleNm="fortress-core-super-admin" admin="true”/>

By changing the name we can no longer differentiate between that one and this one:
    public List<Permission> findPermissions(Permission permission)
        throws SecurityException
    {
        String methodName = "findPermissions”;

Please advise,

Shawn

> Begin forwarded message:
> 
> Reply-To: dev@directory.apache.org
> From: cpike@apache.org
> To: commits@directory.apache.org
> Subject: directory-fortress-core git commit: fixed method name in findPermission(permObj) method
> Date: March 21, 2016 at 9:13:19 AM CDT
> 
> Repository: directory-fortress-core
> Updated Branches:
>  refs/heads/master ff50d8f1e -> d14990b69
> 
> 
> fixed method name in findPermission(permObj) method
> 
> 
> 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/d14990b6
> Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/d14990b6
> Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/d14990b6
> 
> Branch: refs/heads/master
> Commit: d14990b69e2181ef46ba7692c7e98f6ae6307914
> Parents: ff50d8f
> Author: clp207 <cl...@psu.edu>
> Authored: Mon Mar 21 10:13:06 2016 -0400
> Committer: clp207 <cl...@psu.edu>
> Committed: Mon Mar 21 10:13:06 2016 -0400
> 
> ----------------------------------------------------------------------
> .../org/apache/directory/fortress/core/impl/ReviewMgrImpl.java     | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/d14990b6/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
> ----------------------------------------------------------------------
> diff --git a/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
> index 0b04f28..83dc671 100755
> --- a/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
> +++ b/src/main/java/org/apache/directory/fortress/core/impl/ReviewMgrImpl.java
> @@ -133,7 +133,7 @@ public class ReviewMgrImpl extends Manageable implements ReviewMgr, Serializable
> 	@Override
> 	public List<Permission> findPermissions(PermObj permObj)
> 			throws SecurityException {
> -        String methodName = "findObjPermissions";
> +        String methodName = "findPermissions";
>         assertContext( CLS_NM, methodName, permObj, GlobalErrIds.PERM_OBJECT_NULL );
>         VUtil.assertNotNullOrEmpty(permObj.getObjName(), GlobalErrIds.PERM_OBJECT_NM_NULL, CLS_NM + "." + methodName);
>         checkAccess(CLS_NM, methodName);
>