Community Tip - You can change your system assigned username to something more personal in your community settings. X
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.
Solved! Go to Solution.
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
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
PetrH
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.
What I wan't to say here is, that jcaDebug mode should not give additional right for a user.
Hi @iaMarton
In the menu the action is really disabled but the table is special.
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