Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Assigning Users to Roles View modes: 
User avatar
Member
Member
Gavin - 1/8/2014 3:09:29 AM
   
Assigning Users to Roles
Hello,

We currently have all of our users in Kentico, but nobody is assigned to a specific role yet.
We'd like to bulk assign users to one of 3 specific roles now - what is the best way to do this?

In Kentico we have the roles already set up, so Site Manager Roles shows:

Role A
Role B
Role C

We also have the users already set up, but not assigned to a role yet, so Site Manager Users shows:

Joe Bloggs
Fred Bloggs
Jim Bloggs
Jane Bloggs

We also have the information we want imported in a spreadsheet at the moment, and it looks something like:

Name - Role
Joe Bloggs - Role A
Fred Bloggs - Role B
Jim Bloggs - Role C
Jane Bloggs - Role A
etc....

Initially we were thinking of using the Kentico Import Toolkit, but unless I'm missing something, I can't seem to find an option in here to do this.

And advice would be appreciated.

Thank you.
Gavin

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/8/2014 3:27:03 AM
   
RE:Assigning Users to Roles
Hello,

One option is to go to Administration -> Roles -> edit the role -> Users tab and select here all the users you want to assign to this role.
Or, if there are many users and many roles, I would recommend using the API methods and use the list to create conditions to assign users to appropriate roles.

Best regards,
Juraj Ondrus


User avatar
Member
Member
Gavin - 1/8/2014 3:35:50 AM
   
RE:Assigning Users to Roles
Thank you Juraj,

Unfortunately the Administration => Roles option isn't really an option due to the number of users I need to add to groups.

As for the API methods, is there anywhere I can find more information on where and how I would do this?

I've only recently taken on the Kentico administration side of things and am still feeling my way around things.

Also, all of my work so far has been around the configuration and setup - there's been no calling of code or anything like that.

Thank you,
Gavin

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/8/2014 4:28:42 AM
   
RE:Assigning Users to Roles
Hello,

You can add the code e.g. to the code behind of the ASPX page tempalte/document and then just access it in the browser so the code is executed. It is the same as for any other ASP.NET project.
You can also create a user control that you will call on some page, etc.

Best regards,
Juraj Ondrus