1.8. changecontext

changecontext is the tool to change the current quota for a given context. When the context has more changecontext space in use than the new quota allows, the customer is only able to delete files until the usage is below quota. Module access (calendar,tasks,email)can be set via predefined "access combination names". These names can be configured on the server side. All users which are created during later use of the "createuser" tool will inherit the module access rights from the context. If you do not specify any access rights on createcontext minimal access rights will be granted. Currently, these are Webmail and Contacts access rights.

There are some default combinations in the ModuleAccessDefinitions.properties file on the admin server, like:

webmail=webmail, contacts, globaladdressbookdisabled, collectemailaddresses,editpassword
pim=webmail, calendar, contacts, tasks, globaladdressbookdisabled, collectemailaddresses, multiplemailaccounts, subscription, publication,editpassword
pim_infostore=webmail, calendar, contacts, tasks, infostore, webdav, globaladdressbookdisabled, collectemailaddresses, multiplemailaccounts, subscription, publication
pim_mobility=webmail,calendar,contacts,tasks,syncml,usm, activesync,globaladdressbookdisabled,collectemailaddresses,multiplemailaccounts,subscription,publication, editpassword
groupware_standard=webmail,calendar,contacts,infostore,tasks,webdav,ical,vcard,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,collectemailaddresses,multiplemailaccounts,subscription,publication (Groupware Standard always gets new features except mobility and OXtender. )
groupware_premium=webmail,calendar,contacts,infostore,tasks,webdav,webdavxml,ical,vcard,syncml,usm,olox20,activesync,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,collectemailaddresses,multiplemailaccounts,subscription,publication
all=webmail,calendar,contacts,infostore,tasks,webdav,webdavxml,ical,vcard,syncml,usm,olox20,activesync,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,publicfoldereditable,collectemailaddresses,multiplemailaccounts,subscription,publication

When having changed the access rights of the context and its users with "changecontext" the "downgrade" command should be called on the admin server. All unnecessary data are removed from the data base via "groupware api". If e. g. the context 1 is changed from "pim_infostore" to "webmail", the "downgrade" command has to be called for this context then. Then, all unnecessary folders for this context are removed from the data base.

1.8.1. Parameters

-h,- -helpPrints a help text
--environmentShow info about commandline environment
--nonlRemove all newlines (\n) from output
-c,- -contextid <integer>The id of the context
-N,- -contextname <string>The name of the context
-L,- -addmapping <string(s)>Add login mappings. Separated by ","
-R,- -removemapping <stirng(s)>Remove login mappings. Separated by ","
-q,- -quota <integer>Quota for the context filestore in MB
--access-combination-name <access-combination-name>Access combination name

1.8.2. Extra parameters when authentication is enabled

-A,- -adminuser <string>Master Admin user name
-P,- -adminpass <string>Master Admin password

1.8.3. Return value

0 on success

>0 on failure

1.8.4. Mandatory parameters

(contextid or contextname) {adminuser adminpass} and at minimum one attribute to change

1.8.5. Command output

On success:

context <contextid> changed

On failure:

context <contextid> could not be changed: <reason from server>

1.8.6. Example

root@oxhe~# /opt/open-xchange/sbin/changecontext -c 123 -q 500

context 123 changed