User Guide

Chapter 2: ColdFusion Functions 399
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 The IsProtected function only returns true if the resource is protected by a rule in the
security context or sandbox within which a request is being processed. An application
may need to determine if a resource is protected and if the current user is authorized
to use the resource. If a resource is not protected, then the
IsAuthorized function
returns true. In order to determine if a resource is explicitly protected with a rule, you
must use the IsProtected function.
Example <!--- This example calls the IsProtected function. --->
...
<!--------------------------------------------------------------------
The following code checks to see if the Orders data source is protected.
If the data source is protected, the code then checks to see if the
current user is authorized to select information from the datasource.
---------------------------------------------------------------------->
<CFIF IsProtected("DATASOURCE", "Orders", "select")>
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