DLOPermission class

DLOPermission 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).

One of the following authority values is assigned to each user.

Authority value Description
*ALL The user can perform all operations except those operations that are controlled by authorization list management.
*AUTL The authorization list is used to determine the authority for the document.
*CHANGE The user can change and perform basic functions on the object.
*EXCLUDE The user cannot access the object.
*USE The user has object operational authority, read authority, and execute authority.

You must use one of the following methods to change or determine the user's authority:

After setting permissions, it is important that you use the commit() method from the Permissions class to send the changes to the server.

For more information about permissions and authorities, see Chapter 5: Resource Security in the iSeries™ Security Reference Link to PDF.

Example: Using DLOPermission

The following example shows how to retrieve and print the DLO permissions, including the user profiles for each permission.

      // 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());
      }