on 2020 Aug 04 9:31 PM
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
Request clarification before answering.
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
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
Hi Jose Reyes,
Can you contact me?
I have a requirement on CCO.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello José
This is exactly what it should do. Try using this directly within a event procedure and not in a subroutine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.