isreadonly function

The isreadonly function indicates whether the user is logged in with a read-only group. This function is part of the idsadmin class, which provides a library of basic functions for plug-ins for the HCL OpenAdmin Tool (OAT) for Informix®.

Syntax

isreadonly ()

Usage

Use the isreadonly function to determine whether the user is logged in to OAT with a group that has read-only privileges. You can use this information to determine what the user can access in OAT and what to make available to the user.

Return values

A return value of true indicates that the user is logged in with a group that has read-only privileges.

A return value of false indicates that the user is logged in with a group that is not restricted to read-only privileges.

Example

This example returns an error and displays a message if the user is read only. In this example, PermissionRequired is the language keyword; not the message itself.

if ( $this->idsadmin->isreadonly() )
{
    $this->idsadmin->fatal_error($this->idsadmin->lang("PermissionRequired"));
    return;         
}

Copyright© 2018 HCL Technologies Limited