All pastes #566961 Raw Edit

Harry Potter

public text v1 · immutable
·published 2007-06-14 18:31 UTC
rendered paste body
<cfcomponent extends="SystemCenter_CF.model.Users.UsersData">
	
	<cfset variables.config = structNew() />

	<cffunction name="init" output="false" access="public" returntype="SiteUser" hint="I load the SiteUser from a struct">
		<cfargument name="GroupGW" />
		<cfargument name="PermService" />
		<cfargument name="SystemUtils" />
		<cfargument name="AppConfig" />
		<cfdump var="#arguments#">
		<cfdump var="#arguments.PermService#">
		<cfabort showerror="The end"/>
		<cfscript>
			super.init( arguments.GroupGW, arguments.PermService, arguments.SystemUtils, arguments.AppConfig );
			return this;
		</cfscript>
	</cffunction>
	
	<cffunction name="getCurrentGroup" output="false" access="public" returntype="any" hint="I return the current working role for the user">
		<cfset var outputRole = "" />
		
		<cfif listFind( this.getGroups(), "#getOnlineLeasingConfiguration().getConfig('AppID')#.#getOnlineLeasingConfiguration().getConfig('AttorneyRoleCode')#") >
			<cfset outputRole = getOnlineLeasingConfiguration().getConfig('AttorneyRoleCode') />
		<cfelseif listFind( this.getGroups(), "#getOnlineLeasingConfiguration().getConfig('AppID')#.#getOnlineLeasingConfiguration().getConfig('LeaseSubmitterRoleCode')#") >
			<cfset outputRole = getOnlineLeasingConfiguration().getConfig('LeaseSubmitterRoleCode') />
		<cfelseif listFind( this.getGroups(), "#getOnlineLeasingConfiguration().getConfig('AppID')#.#getOnlineLeasingConfiguration().getConfig('AttorneyAdminRoleCode')#") >
			<cfset outputRole = getOnlineLeasingConfiguration().getConfig('AttorneyAdminRoleCode') />
		</cfif>
		
		<cfreturn outputRole />
		
	</cffunction>

	<!---  Usage: GetOnlineLeasingConfiguration / SetOnlineLeasingConfiguration  methods for OnlineLeasingConfiguration value --->
	<cffunction name="getOnlineLeasingConfiguration" access="public" output="false" returntype="any">
		<cfreturn variables.config.OnlineLeasingConfiguration />
	</cffunction>
	
	<cffunction name="setOnlineLeasingConfiguration" access="public" output="false" returntype="void">
		<cfargument name="OnlineLeasingConfiguration" type="any" required="true" />
		<cfset variables.config.OnlineLeasingConfiguration = arguments.OnlineLeasingConfiguration />
	</cffunction>

</cfcomponent>


******************************
ColdSpring config
******************************
	<bean id="SiteUser" class="OnlineLeasing_CF.model.Security.SiteUser" singleton="false" lazy-init="true" autowire="no">
		<constructor-arg name="GroupGW"><ref Bean="GroupGW" /></constructor-arg>
		<constructor-arg name="PermService"><ref Bean="PermService" /></constructor-arg>
		<constructor-arg name="AppConfig"><ref Bean="SystemCenterAppConfig" /></constructor-arg>
		<constructor-arg name="SystemUtils"><ref Bean="SystemUtils" /></constructor-arg>
		<property name="OnlineLeasingConfiguration"><ref bean="OnlineLeasingConfiguration" /></property>
	</bean>