ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/qsysprmt.htm

212 lines
13 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="QSYSPermission" />
<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="qsysprmt" />
<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>QSYSPermission</title>
</head>
<body id="qsysprmt"><a name="qsysprmt"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">QSYSPermission</h1>
<div><p></p>
<div class="section"><p><a href="javadoc/com/ibm/as400/access/QSYSPermission.html"> QSYSPermission</a> is a subclass of the <a href="prmintro.htm#prmintro__userpermission"> UserPermission</a>
class. QSYSPermission allows you to display and set the permission a user
has for an object in the traditional iSeries™ library structure stored in
QSYS.LIB. You can set authority for an object stored in QSYS.LIB by setting
a system-defined authority value or by setting the individual object and
data authorities.</p>
</div>
<div class="section"><p>The following table lists and describes the valid system-defined
authority values:</p>
</div>
<div class="section"><div class="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="d0e33">System-defined authority value</th>
<th valign="top" width="50%" id="d0e35">Description</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="50%" headers="d0e33 ">*ALL</td>
<td valign="top" width="50%" headers="d0e35 ">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="d0e33 ">*AUTL</td>
<td valign="top" width="50%" headers="d0e35 ">The authorization list is used to determine the authority for the document.</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e33 ">*CHANGE</td>
<td valign="top" width="50%" headers="d0e35 ">The user can change and perform basic functions on the object.</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e33 ">*EXCLUDE</td>
<td valign="top" width="50%" headers="d0e35 ">The user cannot access the object.</td>
</tr>
<tr><td valign="top" width="50%" headers="d0e33 ">*USE</td>
<td valign="top" width="50%" headers="d0e35 ">The user has object operational authority, read authority, and execute
authority.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section"><p>Each system-defined authority value actually represents a combination
of the individual object authorities and data authorities. The following
table illustrates the relationships of system-defined authorities to the
individual object and data authorities:</p>
</div>
<div class="section"><div class="p">
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><caption>Table 1. <strong>Y</strong> refers to
those authorities that can be assigned. n refers to those authorities that
cannot be assigned.</caption><thead align="left"><tr><th rowspan="2" valign="top" width="12.149532710280374%" id="d0e87">System-defined authority</th>
<th colspan="5" valign="top" id="d0e89">Object authority</th>
<th colspan="5" valign="top" id="d0e91">Data authority</th>
</tr>
<tr><th valign="top" width="7.850467289719626%" id="d0e94">Opr</th>
<th valign="top" width="8.037383177570094%" id="d0e96">Mgt</th>
<th valign="top" width="7.850467289719626%" id="d0e98">Exist</th>
<th valign="top" width="8.037383177570094%" id="d0e100">Alter</th>
<th valign="top" width="7.850467289719626%" id="d0e102">Ref</th>
<th valign="top" width="8.037383177570094%" id="d0e104">Read</th>
<th valign="top" width="8.037383177570094%" id="d0e106">Add</th>
<th valign="top" width="9.813084112149532%" id="d0e108">Upd</th>
<th valign="top" width="10.934579439252337%" id="d0e110">Dlt</th>
<th valign="top" width="11.401869158878505%" id="d0e112">Exe</th>
</tr>
<tr><th valign="top" width="12.149532710280374%" id="d0e115">All</th>
<th valign="top" width="7.850467289719626%" id="d0e117"><strong>Y</strong></th>
<th valign="top" width="8.037383177570094%" id="d0e120"><strong>Y</strong></th>
<th valign="top" width="7.850467289719626%" id="d0e123"><strong>Y</strong></th>
<th valign="top" width="8.037383177570094%" id="d0e126"><strong>Y</strong></th>
<th valign="top" width="7.850467289719626%" id="d0e129"><strong>Y</strong></th>
<th valign="top" width="8.037383177570094%" id="d0e132"><strong>Y</strong></th>
<th valign="top" width="8.037383177570094%" id="d0e135"><strong>Y</strong></th>
<th valign="top" width="9.813084112149532%" id="d0e138"><strong>Y</strong></th>
<th valign="top" width="10.934579439252337%" id="d0e141"><strong>Y</strong></th>
<th valign="top" width="11.401869158878505%" id="d0e144"><strong>Y</strong></th>
</tr>
</thead>
<tbody><tr><td valign="top" width="12.149532710280374%" headers="d0e87 d0e115 "><strong>Change</strong></td>
<td valign="top" width="7.850467289719626%" headers="d0e89 d0e94 d0e117 "><strong>Y</strong></td>
<td valign="top" width="8.037383177570094%" headers="d0e89 d0e96 d0e120 ">n</td>
<td valign="top" width="7.850467289719626%" headers="d0e89 d0e98 d0e123 ">n</td>
<td valign="top" width="8.037383177570094%" headers="d0e89 d0e100 d0e126 ">n</td>
<td valign="top" width="7.850467289719626%" headers="d0e89 d0e102 d0e129 ">n</td>
<td valign="top" width="8.037383177570094%" headers="d0e91 d0e104 d0e132 "><strong>Y</strong></td>
<td valign="top" width="8.037383177570094%" headers="d0e91 d0e106 d0e135 "><strong>Y</strong></td>
<td valign="top" width="9.813084112149532%" headers="d0e91 d0e108 d0e138 "><strong>Y</strong></td>
<td valign="top" width="10.934579439252337%" headers="d0e91 d0e110 d0e141 "><strong>Y</strong></td>
<td valign="top" width="11.401869158878505%" headers="d0e91 d0e112 d0e144 "><strong>Y</strong></td>
</tr>
<tr><td valign="top" width="12.149532710280374%" headers="d0e87 d0e115 "><strong>Exclude</strong></td>
<td valign="top" width="7.850467289719626%" headers="d0e89 d0e94 d0e117 ">n</td>
<td valign="top" width="8.037383177570094%" headers="d0e89 d0e96 d0e120 ">n</td>
<td valign="top" width="7.850467289719626%" headers="d0e89 d0e98 d0e123 ">n</td>
<td valign="top" width="8.037383177570094%" headers="d0e89 d0e100 d0e126 ">n</td>
<td valign="top" width="7.850467289719626%" headers="d0e89 d0e102 d0e129 ">n</td>
<td valign="top" width="8.037383177570094%" headers="d0e91 d0e104 d0e132 ">n</td>
<td valign="top" width="8.037383177570094%" headers="d0e91 d0e106 d0e135 ">n</td>
<td valign="top" width="9.813084112149532%" headers="d0e91 d0e108 d0e138 ">n</td>
<td valign="top" width="10.934579439252337%" headers="d0e91 d0e110 d0e141 ">n</td>
<td valign="top" width="11.401869158878505%" headers="d0e91 d0e112 d0e144 ">n</td>
</tr>
<tr><td valign="top" width="12.149532710280374%" headers="d0e87 d0e115 "><strong>Use</strong></td>
<td valign="top" width="7.850467289719626%" headers="d0e89 d0e94 d0e117 "><strong>Y</strong></td>
<td valign="top" width="8.037383177570094%" headers="d0e89 d0e96 d0e120 ">n</td>
<td valign="top" width="7.850467289719626%" headers="d0e89 d0e98 d0e123 ">n</td>
<td valign="top" width="8.037383177570094%" headers="d0e89 d0e100 d0e126 ">n</td>
<td valign="top" width="7.850467289719626%" headers="d0e89 d0e102 d0e129 ">n</td>
<td valign="top" width="8.037383177570094%" headers="d0e91 d0e104 d0e132 "><strong>Y</strong></td>
<td valign="top" width="8.037383177570094%" headers="d0e91 d0e106 d0e135 ">n</td>
<td valign="top" width="9.813084112149532%" headers="d0e91 d0e108 d0e138 ">n</td>
<td valign="top" width="10.934579439252337%" headers="d0e91 d0e110 d0e141 ">n</td>
<td valign="top" width="11.401869158878505%" headers="d0e91 d0e112 d0e144 "><strong>Y</strong></td>
</tr>
<tr><td valign="top" width="12.149532710280374%" headers="d0e87 d0e115 "><strong>Autl</strong></td>
<td colspan="10" valign="top" headers="d0e89 d0e91 d0e94 d0e96 d0e98 d0e100 d0e102 d0e104 d0e106 d0e108 d0e110 d0e112 d0e117 d0e120 d0e123 d0e126 d0e129 d0e132 d0e135 d0e138 d0e141 d0e144 ">Only valid with user (*PUBLIC) and a
specified authorization list that determines the individual object and data
authorities.</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section"><p>Specifying a system-defined authority automatically assigns the
appropriate individual authorities. Likewise, specifying various individual
authorities changes the appropriate individual authority values. When a
combination of individual object authorities and data authorities does not
map to a single system-defined authority value, then the single value becomes
"User Defined."</p>
</div>
<div class="section"><p>Use the <a href="javadoc/com/ibm/as400/access/QSYSPermission.html#GETOBJECTAUTHORITY()"> getObjectAuthority()</a> method to display the current system-defined
authority. Use the <a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETOBJECTAUTHORITY(JAVA.LANG.STRING)"> setObjectAuthority()</a> method to set the current system-defined
authority using a single value. </p>
</div>
<div class="section"><p>Use the appropriate set method to set individual object authority
values on or off:</p>
</div>
<div class="section"><ul><li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETALTER(BOOLEAN)"> setAlter()</a></li>
<li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETEXISTENCE(BOOLEAN)"> setExistence()</a></li>
<li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETMANAGEMENT(BOOLEAN)"> setManagement()</a></li>
<li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETOPERATIONAL(BOOLEAN)"> setOperational()</a></li>
<li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETREFERENCE(BOOLEAN)"> setReference()</a></li>
</ul>
</div>
<div class="section"><p>Use the appropriate set method to set individual data authority
values on or off:</p>
</div>
<div class="section"><ul><li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETADD(BOOLEAN)"> setAdd()</a></li>
<li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETDELETE(BOOLEAN)"> setDelete()</a></li>
<li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETEXECUTE(BOOLEAN)"> setExecute()</a></li>
<li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETREAD(BOOLEAN)"> setRead()</a></li>
<li><a href="javadoc/com/ibm/as400/access/QSYSPermission.html#SETUPDATE(BOOLEAN)"> setUpdate()</a></li>
</ul>
</div>
<div class="section"><p>For more information about the different 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" />. For information about using iSeries CL commands to grant and edit
object authorities, see the iSeries CL commands <a href="../cl/grtobjaut.htm">Grant Object Authority (GRTOBJAUT)</a> and <a href="../cl/edtobjaut.htm">Edit Object Authority (EDTOBJAUT)</a>.</p>
</div>
<div class="section"><p><strong>Example</strong></p>
</div>
<div class="section"><p>This example shows you how to retrieve and print the permissions
for a QSYS object.</p>
</div>
<div class="section"><div class="p"><pre> // Create a system object.
AS400 sys = new AS400("MYAS400", "USERID", "PASSWORD");
// Represent the permissions to a QSYS object.
Permission objectInQSYS = new Permission(sys, "/QSYS.LIB/FRED.LIB");
// Print the object pathname and retrieve its permissions.
System.out.println("Permissions on "+objectInQSYS.getObjectPath()+" are as follows:");
Enumeration enum = objectInQSYS.getUserPermissions();
while (enum.hasMoreElements())
{
// For each of the permissions, print out the user profile name
// and that user's authorities to the object.
QSYSPermission qsysPerm = (QSYSPermission)enum.nextElement();
System.out.println(qsysPerm.getUserID()+": "+qsysPerm.getObjectAuthority());
}</pre>
</div>
</div>
</div>
</body>
</html>