cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

disbale TeamCCActionColumn still visible with jcaDebug=true

iaMarton
6-Contributor

disbale TeamCCActionColumn still visible with jcaDebug=true

Hello all,

 

We have overwritten the OOTB validator com.ptc.windchill.enterprise.team.validators.TeamCCActionColumnValidator to hides the "Actions" column completely - until now it's ok.

But if the ?jcaDebug=true is added to the URL, the column and the buttons inside it are visible.

My main problem is that action on those button can be executed.

jcaDebug option overwrites the rules set by the validators?

 

Regards.

 

IM_10027393_0-1684235402935.png

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @iaMarton 

As I wrote, data utility in the column really does not care about the disabling/enabling the action. based on the validator.

If user do not have access the action is not shown. But if has access the action is shown and also is enabled.

 

If you really need to change the behavior you need to rewrite the data utility used for the column adminIconAction

 

DataUtility class is com.ptc.windchill.enterprise.team.dataUtilities.TeamCCDataUtility

there is method processNmUserAdminIconAction where the action is returned 

 

NmAction var12 = this.getAction("team", "replaceUserInTeam", var1, (WTContainer)null);
log.debug("action returned " + var12.toString());
return var12;

 

 

Add a condition that if the nmAction is not enabled return NBSP

 

 

NmAction var12 = this.getAction("team", "replaceUserInTeam", var1, (WTContainer)null);
log.debug("action returned " + var12.toString());
if (var12.isEnabled())
{	
  return var12;
}else{
  return TextDisplayComponent.NBSP;
}

 

 

This can solve your issue. 

 

PS: configuration of dataUtility for the column adminIconAction is Windchill\codebase\com\ptc\windchill\enterprise\enterprise.dataUtilities.properties

 

PetrH

View solution in original post

4 REPLIES 4
HelesicPetr
22-Sapphire I
(To:iaMarton)

Hi @iaMarton 

I can see that the button is hidden by your validator.

So the jcaDebug is not used by standard users. They even not know about it. 

 

jcaDebug shows all actions that are available, because it is debug mode. 

in your example it is hidden so the button should not be active even though it is shown

 

HelesicPetr_0-1684242716789.png

 

PetrH

iaMarton
6-Contributor
(To:HelesicPetr)

Hello Petr,

 

That true, in normal mode, without jcaDebug, the column and the actions are hidden. This is the expected behaviour.

In DebugMode  (?jcaDebug=true), even though it's not intended to be used for normal end-users it's somehow it offers end-user to execute actions which normally should not be accessible.

 

When other actions (not in this user table from the example above) - from Action menu are hidden by a validator in DebugMode they will be listed with gray, so the DebugUser can see if they are in the list and it's disabled by which code... etc.

IM_10027393_0-1684244223966.png

What I wan't to say here is, that jcaDebug mode should not give additional right for a user.

HelesicPetr
22-Sapphire I
(To:iaMarton)

Hi @iaMarton 

 

In the menu the action is really disabled but the table is special. 

HelesicPetr_0-1684245141948.png

 

 

There can be trouble with the table definition because it is column where can be different DataUtility that does not care about the validator result.

 

PetrH

Hi @iaMarton 

As I wrote, data utility in the column really does not care about the disabling/enabling the action. based on the validator.

If user do not have access the action is not shown. But if has access the action is shown and also is enabled.

 

If you really need to change the behavior you need to rewrite the data utility used for the column adminIconAction

 

DataUtility class is com.ptc.windchill.enterprise.team.dataUtilities.TeamCCDataUtility

there is method processNmUserAdminIconAction where the action is returned 

 

NmAction var12 = this.getAction("team", "replaceUserInTeam", var1, (WTContainer)null);
log.debug("action returned " + var12.toString());
return var12;

 

 

Add a condition that if the nmAction is not enabled return NBSP

 

 

NmAction var12 = this.getAction("team", "replaceUserInTeam", var1, (WTContainer)null);
log.debug("action returned " + var12.toString());
if (var12.isEnabled())
{	
  return var12;
}else{
  return TextDisplayComponent.NBSP;
}

 

 

This can solve your issue. 

 

PS: configuration of dataUtility for the column adminIconAction is Windchill\codebase\com\ptc\windchill\enterprise\enterprise.dataUtilities.properties

 

PetrH

Announcements

Top Tags