Non - well known resources
==========================

1.There are three locations of setting files:

1.1 MERAK\config\_webmail\settings.xml 				- server defaults
1.2 MERAK\config\_webmail\<domainname>\settings.xml 		- domain defaults
1.3 MERAK\mail\<domainname>\<username>\~webmail\settings.xml 	- user settings

2.There are two namespaces to work with settings

 2.1 WebmailIqPrivate - takes care about user settings( works with 1.3 file )
                      - SET - depending on domain and server defaults, only variables
                              with full access for end users will be saved
		      - GET - merge all existing settings and return end user settings

GET

<-
{iq}
<query xmlns="webmail:iq:private">
<resources>
<mail_settings_default/>
<mail_settings_general/>
.
.
.
</resources>
</query>
{\iq}

->
{iq}
<query xmlns="webmail:iq:private">
<resources>
<mail_settings_default>
	<item>
		<autosave_minutes access="full">13</autosave_minutes>
	</item>
</mail_settings_default>
<mail_settings_general/>
.
.
.
</resources>
</query>
{\iq}


(Access - rights for end user)

SET
{iq}
<query xmlns="webmail:iq:private" type="set">
<resources>
<mail_settings_default>
	<item>
		<autosave_minutes>15</autosave_minutes>
	</item>
</mail_settings_default>
.
.
.
</resources>
</query>
{\iq}

 2.1 WebmailIqPublic  - this namespace is used by administrators and domainadministrators

 DOMAIN ADMINISTRATOR
	- can set rights for end users(useraccess)
	- set is restricted by system administrator

 SYSTEM ADMINISTRATOR
	- can set rights for both end users and domain administrators
	- can set all settings without restrictions
	- can hanlde domain settings by specifying desired domain



GET

<-
{iq}
<query xmlns="webmail:iq:public">
[<domain>merakdemo.com</domain>]     - this tag is used by administrator, when he set(get)ting 
				     the domain settings
<resources>
<mail_settings_default/>
<mail_settings_general/>
.
.
.
</resources>
</query>
{\iq}

->
{iq}
<query xmlns="webmail:iq:public">
<resources>
<mail_settings_default>
	<item>
		<autosave_minutes useraccess="view" domainadminaccess="view">13</autosave_minutes>
	</item>
</mail_settings_default>
<mail_settings_general/>
.
.
.
</resources>
</query>
{\iq}

SET

<-
{iq}
<query xmlns="webmail:iq:public" type="set">
[<domain>merakdemo.com</domain>]     - this tag is used by administrator, when he set(get)ting 
				     the domain settings
<resources>
<mail_settings_default>
	<item>
		<autosave_minutes useraccess="view" domainadminaccess="full">50</autosave_minutes>
	</item>
</mail_settings_default>
<mail_settings_general/>
.
.
.
</resources>
</query>
{\iq}


Attributes 
 - domainadminaccess - restriction for da    (domain admin can't set)
 - useraccess	     - restriction for user

Values 
 - none - there are no rights , restricted person can't even view this option
 - view - there are viewing rights , so restricted person can't set this option , but have 
          access to its value
 - full - restricted person can do anything he wants




     



