 		form_path varchar2(255),
 		role_name varchar2(255)
 	);
-	
-	CREATE OR REPLACE TRIGGER cf_form_permissions_key                                         
-	 before insert  ON cf_form_permissions  
-	 for each row 
-	    begin     
-	    	if :NEW.key is null then                                                                                      
+
+	CREATE OR REPLACE TRIGGER cf_form_permissions_key
+	 before insert  ON cf_form_permissions
+	 for each row
+	    begin
+	    	if :NEW.key is null then
 	    		select somerandomsequence.nextval into :new.key from dual;
-	    	end if;                                
-	    end;                                                                                            
+	    	end if;
+	    end;
 	/
-	
+
 	// need pkey to make sure we don't kill used roles, and
 	// to make sure used roles are actual roles
-	
+
 	ALTER TABLE cf_ctuser_roles ADD constraint user_role_key PRIMARY KEY (ROLE_NAME);
 	ALTER TABLE cf_form_permissions
 		add CONSTRAINT fk_role


<cfif #action# is "setRoles">
<cfoutput>
	Check or uncheck boxs below to require roles for form access. A form may require any number of roles. 
	No checks means the form is not available to any user and should be PERMANENTLY DELETED.
	
	<cfquery name="roles" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
		select distinct role_name from cf_ctuser_roles order by role_name
	</cfquery>

		<cfset path=left(filter,sPos)>
		<cfset ff=mid(filter,sPos+1,len(filter)-sPos+1)>
	</cfif>

	#Application.webDirectory##path#


	<cfdirectory action="LIST"
    	directory="#Application.webDirectory##path#"
        name="root"
