Script to set quota for users

cancel
Showing results for 
Search instead for 
Did you mean: 
hoomanv
Active Member II

Script to set quota for users

Jump to solution

Hello,

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

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

1 Solution

Accepted Solutions
douglascrp
Advanced II

Re: Script to set quota for users

Jump to solution

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 solution in original post

1 Reply
douglascrp
Advanced II

Re: Script to set quota for users

Jump to solution

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