public boolean isGranted(AuthzTrans trans, String user, String ns, String type,String instance, String action) {
		Result<List<PermDAO.Data>> perms = getPermsByUser(trans, user, false);
		if (perms.isOK()) {
			for (PermDAO.Data pd : perms.value) {
				if (ns.equals(pd.ns)) {
					if (type.equals(pd.type)) {
						if (PermEval.evalInstance(pd.instance, instance)) {
							if(PermEval.evalAction(pd.action, action)) { // don't return action here, might miss other action 
								return true;
							}
						}
					}
				}
			}
		}
		return false;
	}
public boolean isGranted ( AuthzTrans trans , String user , String ns , String type , String instance , String action ) { Result < List < PermDAO . Data > > perms = getPermsByUser ( trans , user , false ) ; if ( perms . isOK ( ) ) { for ( PermDAO . Data pd : perms . value ) { if ( ns . equals ( pd . ns ) ) { if ( type . equals ( pd . type ) ) { if ( PermEval . evalInstance ( pd . instance , instance ) ) { if ( PermEval . evalAction ( pd . action , action ) ) { return true ; } } } } } } return false ; }
isGranted

Important function - Check internal Permission Schemes for Permission to
do things

@param trans
@param type
@param instance
@param action
@return