Table Of Contents
 

CF_FileManager Managing Permissions

Author : Daniel Mackey Email : dan@digital-crew.com

CF_FileManager is built upon the dcCom Architecture which is constructed from a series of ColdFusion Custom Tags. When using the component, you initiate an instance of the custom tag <CF_dcCom>. The dcCom engine then in turn calls the File Manager component in the components folder.

The attributes passed to the dcCom custom tag are serialized and passed through to the main executing template of the called component. Using combinations of these attributes, an unlimited amount of permission levels can be created.

For example, in a typical application you would have many users with many different levels of permission. This can be dictated by your own application.

Using code similar to the following, you can build your own tiered security model for CF_FileManager.

<cfquery name="getUser" .............>
SELECT userFolder,userSecurityLevel
FROM users
WHERE userId=#session.userId#

</cfquery>

<cfswitch expression="#getUser.userSecurityLevel#">
 
 <cfcase value="low">
  <!---------------Everything enabled---------------------------->
  <cf_dcCom component="dcFileManager" folder="#getUser.userFolder#">
  <!------------------------------------------------------------->
 </cfcase>
 
 <cfcase value="high">
  <!---------------Do not allow uploads and deletion------------->
  <cf_dcCom component="dcFileManager" folder="#getUser.userFolder#" allowUploadFile="no" allowFileDelete="no" allowFolderDelete="no">
  <!------------------------------------------------------------->
 </cfcase>

</cfswitch>

Using a combination of attributes, you can control nearly every aspect of CF_FileManager per user.

For a complete list of available attributes, please view this page : CF_FileManager Attribute List.