cancel
Showing results for 
Search instead for 
Did you mean: 

Script to set quota for users

hoomanv
Confirmed Champ
Confirmed Champ

Hello,

I need a script to set quota for hundreds of users.

I'd appreciate if someone helps me accomplish this task.

1 ACCEPTED ANSWER

douglascrp
World-Class Innovator
World-Class Innovator

All you need is to execute a query to recover the users you want to work on, and then, use the following API:

var nodes = search.luceneSearch('+TYPE:"cmSmiley Tongueerson"');
for each(var node in nodes) {
    node.setQuota(user, "10240000"); // 10 MB
}

setQuota | Alfresco Documentation 

View answer in original post

1 REPLY 1

douglascrp
World-Class Innovator
World-Class Innovator

All you need is to execute a query to recover the users you want to work on, and then, use the following API:

var nodes = search.luceneSearch('+TYPE:"cmSmiley Tongueerson"');
for each(var node in nodes) {
    node.setQuota(user, "10240000"); // 10 MB
}

setQuota | Alfresco Documentation