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

Error using SHOW_CREDENTIALS_FORM, change user

former_member333938
Participant
0 Likes
401

Hello all,

I am using this code to display a CREDENTIALS FORM when I want to request an authorization:

But I have noticed that when using it, it changes the user, specifically the user that is entered in the CREDENTIALS_FORM.

for example:

before to display CREDENTIALS FORM.

CREDENTIALS FORM.

after.

user changed.

Does anyone know how to solve this?

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Klaus_Frick
Active Participant
0 Likes

Hello José

Maybe because you force a login, instead of checking a permission. I'm using the following code for Permission Control, which works fine:

UIRequestContext ctx = ExecutionContext.getContextObject("uiRequestContext", UIRequestContext.class);		
try {
	ProtectedResource protResource = new ProtectedResource("PERMISSION-TO-CHECK");
	PermissionControl.INSTANCE.checkPermission(ctx.getUserForPermissionCheck(), protResource);
} catch (InsufficientPermissionException e) {
	// --> Permission failed
}
former_member333938
Participant
0 Likes

Hello Klaus thank you very much for replying.

Your code works very well for me to verify if the user has a specific permission, but I am trying to use the SHOW_CREDENTIALS_FORM because if the user does not have the permission it must be authorized by a user who does.

do you have any idea how to solve this?

Answers (2)

Answers (2)

0 Likes

Hi Jose Reyes,

Can you contact me?

I have a requirement on CCO.

Klaus_Frick
Active Participant
0 Likes

Hello José

This is exactly what it should do. Try using this directly within a event procedure and not in a subroutine.

former_member333938
Participant
0 Likes

Thank you very much