Difference between revisions of "Documentation/Administration Guide/Restricting functionality"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- {{DISPLAYTITLE: Restricting Functionality in {{OOo}}}} -->
+
{{DISPLAYTITLE: Restricting Functionality in {{AOo}}}}
{{Documentation/AdminGuideTOC/v2}}
+
{{Documentation/AdminGuideTOC/v2
{{Documentation/Abstract|You can restrict the functionality of {{OOo}} program modules for individual users, groups, or across a network. If you want, you can also apply different restrictions to different users. You can also create a command configuration file in XML format to restrict the availability of menu commands in a {{OOo}} program.}}
+
|ShowPrevNext=block
 +
|ShowPrevPage=block
 +
|ShowNextPage=block
 +
|PrevPage=Documentation/Administration Guide/Customizing the UI
 +
|NextPage=Documentation/Administration Guide/LDAP Access
 +
}}
  
==Creating a Command Configuration File==
+
You can restrict the functionality of {{AOo}} program modules for individual users, groups, or across a network. You can apply different restrictions to different users. You can also create a command configuration file in XML format to restrict the availability of menu commands in an {{AOo}} program.
 +
 +
== Creating a Command Configuration File ==
  
 
The creation of a command configuration file is a three-step process:
 
The creation of a command configuration file is a three-step process:
  
* Determine the command names of the features that you want to restrict
+
* Determine the command names of the features you want to restrict.
* Create an XML configuration file
+
* Create an XML configuration file.
* Copy the configuration file to the appropriate location in the StarOffice installation directory
+
* Copy the configuration file to the appropriate location in the {{AOo}} installation directory.
  
 
====To Create a Command Configuration File====
 
====To Create a Command Configuration File====
  
 
<ol class="task">
 
<ol class="task">
<li> Determine the [http://wiki.services.openoffice.org/wiki/Framework/Article/OpenOffice.org_2.x_Commands UNO Command Names] for the feature(s) that you want to restrict.
+
<li> Determine the [https://wiki.openoffice.org/wiki/Framework/Article/OpenOffice.org_3.x_Commands UNO Command Names] for the feature that you want to restrict.
 
</li>
 
</li>
 
<li> In a text editor, create an XML configuration file.</li>
 
<li> In a text editor, create an XML configuration file.</li>
 
<ol class="task" type="a">
 
<ol class="task" type="a">
<li>Ensure that the file has the following structure</li>
+
<li>Use the following file structure.</li>
<div class="code">
+
 
 +
<syntaxhighlight lang="xml">
 
  <?xml version="1.0" encoding="UTF-8" ?>
 
  <?xml version="1.0" encoding="UTF-8" ?>
 
  <oor:node oor:name="Commands" oor:package="org.openoffice.Office"  
 
  <oor:node oor:name="Commands" oor:package="org.openoffice.Office"  
Line 35: Line 43:
 
   </node>
 
   </node>
 
  </oor:node>
 
  </oor:node>
</div>
+
</syntaxhighlight>
<br>
+
 
 
The <tt>Commands.xcu</tt> file uses the following schema:
 
The <tt>Commands.xcu</tt> file uses the following schema:
<div class="code">
+
 
 +
<syntaxhighlight lang="xml">
 
  <?xml version='1.0' encoding='UTF-8'?>
 
  <?xml version='1.0' encoding='UTF-8'?>
 
  <oor:component-schema oor:name="Commands"  
 
  <oor:component-schema oor:name="Commands"  
Line 56: Line 65:
 
   </component>
 
   </component>
 
  </oor:component-schema>
 
  </oor:component-schema>
</div>
+
</syntaxhighlight>
<br>
+
<li>Create a separate node for each feature you want to restrict.</li>
<li>Create a separate node for each feature that you want to restrict.</li>
+
 
<li>In each node, replace the term <tt>CommandName</tt> with the command name of the feature.</li>
 
<li>In each node, replace the term <tt>CommandName</tt> with the command name of the feature.</li>
 
</ol>
 
</ol>
<li>Save the file as <tt>Commands.xcu</tt>.</li>
+
<li>Save the file with the name <tt>Commands.xcu</tt>.</li>
 
</ol>
 
</ol>
  
The following <tt>Commands.xcu</tt> file disables the ability to customize menus in {{OOo}}. To apply this restriction to all users, copy the file to the <tt>
+
The following example <tt>Commands.xcu</tt> file disables the ability to customize menus in {{AOo}}.
&lt;SO network dir&gt;/share/registry/data/org/openoffice/Office</tt> directory.
+
  
  &lt;?xml version="1.0" encoding="UTF-8" ?&gt;
+
<syntaxhighlight lang="xml">
  &lt;oor:node oor:name="Commands"  
+
  <?xml version="1.0" encoding="UTF-8" ?>
 +
  <oor:node oor:name="Commands"  
 
  oor:package="org.openoffice.Office"  
 
  oor:package="org.openoffice.Office"  
 
  xmlns:oor="http://openoffice.org/2001/registry"  
 
  xmlns:oor="http://openoffice.org/2001/registry"  
 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"  
 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"  
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
+
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   &lt;node oor:name="Execute"&gt;
+
   <node oor:name="Execute">
     &lt;node oor:name="Disabled"&gt;
+
     <node oor:name="Disabled">
       &lt;node oor:name="ConfigureDialog" oor:op="replace"&gt;
+
       <node oor:name="ConfigureDialog" oor:op="replace">
         &lt;prop oor:name="Command"&gt;
+
         <prop oor:name="Command">
           &lt;value&gt;ConfigureDialog&lt;/value&gt;
+
           <value>ConfigureDialog</value>
         &lt;/prop&gt;
+
         </prop>
       &lt;/node&gt;
+
       </node>
       &lt;node oor:name="ConfigureToolboxVisible" oor:op="replace"&gt;
+
       <node oor:name="ConfigureToolboxVisible" oor:op="replace">;
         &lt;prop oor:name="Command"&gt;
+
         <prop oor:name="Command">
           &lt;value&gt;LoadToolBox&lt;/value&gt;
+
           <value>LoadToolBox</value>
         &lt;/prop&gt;
+
         </prop>
       &lt;/node&gt;
+
       </node>
     &lt;/node&gt;
+
     </node>
   &lt;/node&gt;
+
   </node>
   &lt;/oor:node&gt;</programlisting>
+
   </oor:node>
 +
</syntaxhighlight>
  
For a list as well as a description of command names, see [Index of UNO Command Names for {{OOo}}].
+
To apply this restriction to all users, copy the file to the <tt>''network-install-dir''/share/registry/data/org/openoffice/Office</tt> directory.
.
+
 
 +
For a list of command names and their descriptions, see [[Framework/Article/OpenOffice.org_3.x_Commands|Index of UNO Command Names for {{AOo}}]].
  
 
====To Apply a Command Configuration File====
 
====To Apply a Command Configuration File====
  
You can apply a command configuration file to {{OOo}} on Solaris, Linux, and Windows.
+
You can apply a command configuration file to {{AOo}} on the Solaris, Linux, and Windows platforms.
  
# Exit all {{OOo}} applications.<br> On Windows, ensure that you exit the {{OOo}} Quickstarter in the system tray.
+
# Exit all {{AOo}} applications. <br>On Windows, ensure that you deactivate the {{AOo}} Quickstarter in the system tray.
 
# Copy the <tt>Commands.xcu</tt> file to the appropriate directory.
 
# Copy the <tt>Commands.xcu</tt> file to the appropriate directory.
#* To apply the configuration to all users on the network, copy the <tt> Commands.xcu</tt> file to the following directory:<br> <tt>&lt;SO network dir&gt;/share/registry/data/org/openoffice/Office</tt>
+
#* To apply the configuration to all users on the network, copy the <tt> Commands.xcu</tt> file to the following directory:<br> <tt>''network-install-dir''/share/registry/data/org/openoffice/Office</tt>
#* To apply the configuration to a specific user on the network, copy the <tt> Commands.xcu</tt> file to the following directory:<br> <tt> &lt;SO workstat dir&gt;/user/registry/data/org/openoffice/Office</tt>
+
#* To apply the configuration to a specific user on the network, copy the <tt> Commands.xcu</tt> file to the following directory:<br> <tt>''workstat-dir''/user/registry/data/org/openoffice/Office</tt>
 
+
 
+
The configuration is applied when you restart {{OOo}}
+
  
 +
The configuration is applied when you restart {{AOo}}
  
 +
{{InterWiki Languages AdminGuide|articletitle=Documentation/Administration Guide/Restricting functionality}}
 
{{PDL1}}
 
{{PDL1}}

Latest revision as of 17:45, 1 February 2021


You can restrict the functionality of Apache OpenOffice program modules for individual users, groups, or across a network. You can apply different restrictions to different users. You can also create a command configuration file in XML format to restrict the availability of menu commands in an Apache OpenOffice program.

Creating a Command Configuration File

The creation of a command configuration file is a three-step process:

  • Determine the command names of the features you want to restrict.
  • Create an XML configuration file.
  • Copy the configuration file to the appropriate location in the Apache OpenOffice installation directory.

To Create a Command Configuration File

  1. Determine the UNO Command Names for the feature that you want to restrict.
  2. In a text editor, create an XML configuration file.
    1. Use the following file structure.
    2.  <?xml version="1.0" encoding="UTF-8" ?>
       <oor:node oor:name="Commands" oor:package="org.openoffice.Office" 
       xmlns:oor="http://openoffice.org/2001/registry" 
       xmlns:xs="http://www.w3.org/2001/XMLSchema" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <node oor:name="Execute">
          <node oor:name="Disabled">
            <node oor:name="CommandName" oor:op="replace">
              <prop oor:name="Command">
                <value>CommandName</value>
              </prop>
            </node>
          </node>
        </node>
       </oor:node>

      The Commands.xcu file uses the following schema:

       <?xml version='1.0' encoding='UTF-8'?>
       <oor:component-schema oor:name="Commands" 
       oor:package="org.openoffice.Office" xml:lang="en-US" 
       xmlns:oor="http://openoffice.org/2001/registry" 
       xmlns:xs="http://www.w3.org/2001/XMLSchema" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <templates>
          <group oor:name="CommandType">
            <prop oor:name="Command" oor:type="xs:string"/>
          </group>
        </templates>
        <component>
          <group oor:name="Execute">
            <set oor:name="Disabled" oor:node-type="CommandType"/>
          </group>
        </component>
       </oor:component-schema>
    3. Create a separate node for each feature you want to restrict.
    4. In each node, replace the term CommandName with the command name of the feature.
  3. Save the file with the name Commands.xcu.

The following example Commands.xcu file disables the ability to customize menus in Apache OpenOffice.

 <?xml version="1.0" encoding="UTF-8" ?>
 <oor:node oor:name="Commands" 
 oor:package="org.openoffice.Office" 
 xmlns:oor="http://openoffice.org/2001/registry" 
 xmlns:xs="http://www.w3.org/2001/XMLSchema" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <node oor:name="Execute">
     <node oor:name="Disabled">
       <node oor:name="ConfigureDialog" oor:op="replace">
         <prop oor:name="Command">
           <value>ConfigureDialog</value>
         </prop>
       </node>
       <node oor:name="ConfigureToolboxVisible" oor:op="replace">;
         <prop oor:name="Command">
           <value>LoadToolBox</value>
         </prop>
       </node> 
     </node>
   </node>
  </oor:node>

To apply this restriction to all users, copy the file to the network-install-dir/share/registry/data/org/openoffice/Office directory.

For a list of command names and their descriptions, see Index of UNO Command Names for Apache OpenOffice.

To Apply a Command Configuration File

You can apply a command configuration file to Apache OpenOffice on the Solaris, Linux, and Windows platforms.

  1. Exit all Apache OpenOffice applications.
    On Windows, ensure that you deactivate the Apache OpenOffice Quickstarter in the system tray.
  2. Copy the Commands.xcu file to the appropriate directory.
    • To apply the configuration to all users on the network, copy the Commands.xcu file to the following directory:
      network-install-dir/share/registry/data/org/openoffice/Office
    • To apply the configuration to a specific user on the network, copy the Commands.xcu file to the following directory:
      workstat-dir/user/registry/data/org/openoffice/Office

The configuration is applied when you restart Apache OpenOffice

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages