Error while access IDCUser's DetailView

StatusIDPriorityType
Closed24200MajorQuestion
ProfileReply
lucas.swapiClient

Hello guys, I'm having a problem when I try to access the IDCUser's detail.

Only if the logged user has administrator permission that the error does not happen.
The error shows is the following:
"permissionRequest.TargetObject incompatible with targetObject.GetType()"

I have attached a print showing my configuration of Data Access Permissions of Users' role.

Thanks in advance!

Replies

UserDescriptionPosted On
Sasha (Xafari Support)Agent

Hello Lucas,

Unfortunately we can't reproduce the issue.

Could you please provide us with more information on when this error appears

(for example CallStack the error,
list(screenshot) of included modules Xafari,
properties of security
PropertiesSecurity24200
)
or send us simple sample?

Thanks, Sasha.

lucas.swapi

Hello Sasha,
I'm not using the Xafari Authentication. This may be causing the problem?
I have attached a sample project to more clarify the situation.

Regards.

Attached files:
lucas.swapi

I forgot to attach the database backup wih my configuration.
Please login with 'usuario' without password.

Regards

Attached files:
Sasha (Xafari Support)Agent

Hello,

Thank you for the additional information.
Give us some time to research this issue.

Regards, Sasha.

Sasha (Xafari Support)Agent

Hello Lucas,
Xafari Security using extension for your Xafari version and new versions.
Sorry, we did not change the Security documentation.

 

We attach a video for you to address the issue with 'IDCUser's DetailView'(attached file Security.zip).

For Updater.cs file you can use next code:

public override void UpdateDatabaseAfterUpdateSchema() {
base.UpdateDatabaseAfterUpdateSchema();
var adminRole = ObjectSpace.FindObject<IDCSecuritySystemRole>(
new BinaryOperator("Name", SecurityStrategy.AdministratorRoleName));
if (adminRole == null)
{
adminRole = ObjectSpace.CreateEntity<IDCSecuritySystemRole>();
adminRole.Name = SecurityStrategy.AdministratorRoleName;
adminRole.IsAdministrative = true;
}
var adminUser = ObjectSpace.FindObject<IDCSecuritySystemUser>(
new BinaryOperator("UserName", "admin"));
if (adminUser == null)
{
adminUser = ObjectSpace.CreateEntity<IDCSecuritySystemUser>();
adminUser.UserName = "admin";
adminUser.SetPassword("");
adminUser.DCRoles.Add(adminRole);
adminUser.IsActive = true;
}
}

Please try this solution and let me know whether it suits you or not.

lucas.swapi

Hello Sasha, this solution solve the problem but I have a much wider application with several users and wouldn't be feasible to apply this solution.

I would like to understand why the MyDetails View problem occur only if the logged user doesn't have the Administrator Role.

Regards.

Sasha (Xafari Support)Agent

Hello,

Thank you for your answer.

We are working on your issue and it will take some additional time.
Please bear with us.

Regards, Sasha.

Sasha (Xafari Support)Agent

Hello Lucas,

To solve your issue you must:
- edit your application on video (attached file Security.zip previously)
- Clean and Build the solution
- copy and save your database
- examine the script (attached file SQL_Script.zip) and run this script for your DB. This script adapts the database for its proper operation.
- run application.

Let me know if you need further assistance.
Regards, Sasha.

Attached files:
lucas.swapi

Thank you for the script.
However, I implemented a temporary solution redirecting the "My Details" to another view because it has many IDCUser's calls in code as well.
I will schedule this change as soon as possible.

Regards.

× This ticket is closed.

Write US