96 lines
5.2 KiB
HTML
96 lines
5.2 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="DLOPermission class" />
|
|
<meta name="abstract" content="" />
|
|
<meta name="description" content="" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="dloprmit" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>DLOPermission class</title>
|
|
</head>
|
|
<body id="dloprmit"><a name="dloprmit"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">DLOPermission class</h1>
|
|
<div><p></p>
|
|
<div class="section"><p><a href="javadoc/com/ibm/as400/access/DLOPermission.html"> DLOPermission</a> is a subclass of UserPermission. DLOPermission
|
|
allows you to display and set the authorities a user has (called permissions)
|
|
to a document library object (DLO).</p>
|
|
<p>One of the following authority values
|
|
is assigned to each user.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr class="tablemainheaderbar"><th valign="top" width="50%" id="d0e24">Authority value</th>
|
|
<th valign="top" width="50%" id="d0e26">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="50%" headers="d0e24 ">*ALL</td>
|
|
<td valign="top" width="50%" headers="d0e26 ">The user can perform all operations except those operations that are
|
|
controlled by authorization list management.</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e24 ">*AUTL</td>
|
|
<td valign="top" width="50%" headers="d0e26 ">The authorization list is used to determine the authority for the document.</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e24 ">*CHANGE</td>
|
|
<td valign="top" width="50%" headers="d0e26 ">The user can change and perform basic functions on the object.</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e24 ">*EXCLUDE</td>
|
|
<td valign="top" width="50%" headers="d0e26 ">The user cannot access the object.</td>
|
|
</tr>
|
|
<tr><td valign="top" width="50%" headers="d0e24 ">*USE</td>
|
|
<td valign="top" width="50%" headers="d0e26 ">The user has object operational authority, read authority, and execute
|
|
authority.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>You must use one of the following methods to change or determine
|
|
the user's authority:</p>
|
|
<ul><li>Use <a href="javadoc/com/ibm/as400/access/DLOPermission.html#GETDATAAUTHORITY()"> getDataAuthority()</a> to display the authority value of
|
|
the user</li>
|
|
<li>Use <a href="javadoc/com/ibm/as400/access/DLOPermission.html#SETDATAAUTHORITY(JAVA.LANG.STRING)"> setDataAuthority()</a> to set the authority value of the
|
|
user</li>
|
|
</ul>
|
|
<p>After setting permissions, it is important that you use the <a href="javadoc/com/ibm/as400/access/Permission.html#COMMIT()"> commit()</a> method from the <a href="prmintro.htm#prmintro">Permissions</a> class
|
|
to send the changes to the server.</p>
|
|
<p>For more information about permissions
|
|
and authorities, see Chapter 5: Resource Security in the <strong><a href="../books/sc415302.pdf">iSeries™ Security Reference</a></strong> <img src="wbpdf.gif" alt="Link to PDF" />.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Example: Using DLOPermission</h4><p>The following example
|
|
shows how to retrieve and print the DLO permissions, including the user profiles
|
|
for each permission. </p>
|
|
<pre> // Create a system object.
|
|
|
|
AS400 sys = new AS400("MYAS400", "USERID", "PASSWORD");
|
|
// Represent the permissions to a DLO object.
|
|
Permission objectInQDLS = new Permission(sys, "/QDLS/MyFolder");
|
|
|
|
// Print the object pathname and retrieve its permissions.
|
|
System.out.println("Permissions on " + objectInQDLS.getObjectPath() + " are as follows:");
|
|
Enumeration enum = objectInQDLS.getUserPermissions();
|
|
while (enum.hasMoreElements())
|
|
{
|
|
// For each of the permissions, print out the user profile name
|
|
// and that user's authorities to the object.
|
|
DLOPermission dloPerm = (DLOPermission)enum.nextElement();
|
|
System.out.println(dloPerm.getUserID() + ": " + dloPerm.getDataAuthority());
|
|
}</pre>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |