Developer forum

Forum » CMS - Standard features » Edit another user profile using Extranet App

Edit another user profile using Extranet App

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a situation where I need to edit the details of another user.

Imagine inviting new users, and then the ability to edit some of their details.

I know I can use the ExtranetApp for editing the profile of the current user, I was wondering if I can still use the extranet app but connect it to a different UserID than the current logged-in user.

I am (still) using DW9. 

Thank you,

Adrian


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Anybody?

Thank you,
Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

I don't think you can do that. We developed a custom webapi to do this.

 

BR

Nuno

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

I was somehow expecting this :(

Can I convince you to share your code :) ?

Maybe across some beers in Hamburg?

Thank you,
Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

Yes, of course. In fact I noticed that we changed it to using the webapi, so it's just some JS. I can try to look into the old code. 

 

In our case we were allowing the user (Impersonating another user - aka the Secundary user) to update their password. Is this what you're trying to achieve? Otherwise you'll have to implement some security measures to validate the request cannot be exploited (since it will be public and has the potential to update any user and any field.

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

In my case, a user can/should be able to create subusers that will be used as companies (I cannot use Addresses for this purpose). The newly created user objects won't have credentials for logging in.
The editing process will involve changing quite a few fields. I am not sure if Impersonation would work in our case.

I may need to rethink it.

Thank you anyway,

Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Adrian

You might want to take a look at manage users here:

https://github.com/dynamicweb/Swift/tree/main/Swift/Files/Templates/Designs/Swift/UserManagement/CreateProfile

It will create a user for you using another user (administrator).

We currently have a bug related to customernumber not being saved on the user you create - the problem is security (Doing this custom can also pose a serious security issue)

We are also in the process of creating new users modules supporting viewmodels for DW10. And managing users under another user, is part of the scope. Who can edit which fiels is the difficult part - e.g. being able to change customer number and other things makes it possible to get access to other users data and stuff like that.

If you have the chance to describe the entire flow you are working on, that would be appreciated.

Thanks, Nicolai

 

You must be logged in to post in the forum