cancel
Showing results for 
Search instead for 
Did you mean: 

Create User using people api

silenr0c
Champ in-the-making
Champ in-the-making
Hi Folks,

I manage to do several things:
- create user using http://localhost:8080/alfresco/service/api/people
- assign group to user

I wonder how to achieve following things
- not auto create user folder in user_home when I create user using above api, let say I want to create my own folder structure and assign that access to newly created user
- what is the limit of creating user & folder (under user_home), the reason I ask this is because I will need to create quite a number of users (let say maybe few hundred thousands) and I'm not sure if alfresco can handle this many user and also the folder structure.

Thanks for your kind reply & attention
- silenr0c -

Additional Info:
- Alfresco Edition : Community v4.2.0 (4576) schema 6,022
- post data sample for people api
{
   "userName": "andy",
   "firstName": "andy",
   "lastName": "bogard",
   "email": "andy_bogard@yahoo.com",
   "password":"abcdefg",
   "groups":["GROUP_testing"]
}
8 REPLIES 8

abarisone
Star Contributor
Star Contributor
Hi,
here you can find some answers to your question http://forums.alfresco.com/forum/developer-discussions/other-apis/cant-add-person-restful-api-081320...
About the max users limit, it depends on the type of configuration: the more users you want, the more complex and scaled architecture you need.
About the number of folders it is a handy rule of thumb to have less than 1000 subfolders inside each folder: this happens because if you go over that limit you're likely to have performance issues.

Regards,
Andrea

silenr0c
Champ in-the-making
Champ in-the-making
Hi Andrea,

Thanks for your reply, that's what I'm afraid of.
Now to handle those limit I need to restructure user_home
- how to not autocreate folder in user_home when using people/api
- create folder and assign user to that folder using webscript

Thanks,
Cornelis

kaynezhang
World-Class Innovator
World-Class Innovator
alfresco repository support create user home folder under other folder and assign user to that folder,But it seems that webscript api doese not support this feature,you can write a webscript api to implement this function.

silenr0c
Champ in-the-making
Champ in-the-making
Hi Kaynezhang,

I haven't search that part yet, thanks for your hint.

I find out 1 api to create folder, will explore this first
<blockquote>http://localhost:8080/alfresco/service/cmissamples/createfolder</blockquote>

but I'm still not sure how to deleteTree, I create following thread to discuss this.
https://forums.alfresco.com/forum/developer-discussions/web-scripts/cmis-deletetree-web-script-08022...

Thanks
- silenr0c -

silenr0c
Champ in-the-making
Champ in-the-making

silenr0c
Champ in-the-making
Champ in-the-making
Still regarding with adding user with people api (http://localhost/alfresco/service/api/people)
I found out few things that haven't solved yet

Step that I have done with web script
a. create USR01 with people api
b. delete /User Homes/USR01
c. create folder /User Homes/Testing/USR01
d. assign permission to /User Homes/Testing/USR01 using node.setPermission("All", user );

Issue:
1. when I login using this USR01 from http://localhost/alfresco, Alfresco will auto create folder again in /User Homes/USR01
2. USR01 can view and download items from other user, which I don't want it to happen.

I suspect I must set User Homes value somewhere.

Any Hint?

Thanks in advance
- silenr0c -

mitpatoliya
Star Collaborator
Star Collaborator
You can try setting inherit permission to false on User Homes space.

silenr0c
Champ in-the-making
Champ in-the-making
Hi Mits,

I try to change it but it still the same