User Guide
388 CFML Language Reference
action
String specifying the action for which authorization is requested. Do not specify
this parameter for COMPONENT and CUSTOMTAG. For all other resource types,
this parameter is required.
Usage If you specify THROWONFAILURE=Yes in the CFAUTHENTICATE tag, you can enclose
IsAuthorized in a CFTRY/CFCATCH block to handle possible exceptions
programmatically.
Example <!--- This example calls the IsAuthorized
function. --->
...
<!--- Is user is authorized to select information from the
Orders data source? --->
<CFIF IsAuthorized("DATASOURCE", "Orders", "select")>
<CFQUERY NAME="GetList" datasource="Orders">
SELECT * FROM Orders
</CFQUERY>
<CFOUTPUT QUERY="GetList">
Authorization Succeeded. Order information follows:
resourcetype specification Possible ACTIONs
APPLICATION ALL
USECLIENTVARIABLES
CFML Valid actions for the tag specified by resourcename
FILE READ
WRITE
DATASOURCE ALL
CONNECT
SELECT
INSERT
UPDATE
DELETE
SP (stored procedure)
COMPONENT No actions for this resource type
COLLECTION DELETE
OPTIMIZE
PURGE
SEARCH
UPDATE
CUSTOMTAG No actions for this resource type
USEROBJECT Action specified via the ColdFusion Administrator