summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/App_Data/users.xml
diff options
context:
space:
mode:
authorwei <>2006-07-18 23:39:13 +0000
committerwei <>2006-07-18 23:39:13 +0000
commit2fbc53d1f5d9e0a000717642d02558453bc610a8 (patch)
tree0ab6b464cf6b319f862e075ddd442558971c5aa6 /demos/time-tracker/protected/App_Data/users.xml
parent319df8f534520c8c926d0cdaa1f5577c7bd8a909 (diff)
Add more tests and business code for time-tracker
Diffstat (limited to 'demos/time-tracker/protected/App_Data/users.xml')
-rw-r--r--demos/time-tracker/protected/App_Data/users.xml133
1 files changed, 0 insertions, 133 deletions
diff --git a/demos/time-tracker/protected/App_Data/users.xml b/demos/time-tracker/protected/App_Data/users.xml
deleted file mode 100644
index f4151c30..00000000
--- a/demos/time-tracker/protected/App_Data/users.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<sqlMap>
-
-<resultMap id="time-tracker-user" class="TimeTrackerUser" GroupBy="Name">
- <result property="Name" column="Name" />
- <result property="EmailAddress" column="EmailAddress" />
- <result property="Roles" Type="array" resultMapping="user-roles-result" />
-</resultMap>
-
-<resultMap id="user-roles-result">
- <result column="role" />
-</resultMap>
-
-<!--
-<select id="GetUserByName" parameterClass="string" resultMap="TimeTrackerUser">
- SELECT
- users.Username as Name,
- users.EmailAddress as EmailAddress,
- user_roles.RoleType as role
- FROM
- users
- LEFT JOIN user_roles ON users.Username = user_roles.UserID
- WHERE
- Username = #value#
- AND
- Disabled = 0
-</select>
--->
-
-<select id="GetUserByName" parameterClass="string" resultMap="time-tracker-user">
- SELECT
- users.Username as Name,
- users.EmailAddress as EmailAddress,
- user_roles.RoleType as role
- FROM
- users
- LEFT JOIN user_roles ON users.Username = user_roles.UserID
- WHERE
- Username = #value#
- AND
- Disabled = 0
-</select>
-
-<select id="GetAllUsers" resultMap="time-tracker-user">
- SELECT
- users.Username as Name,
- users.EmailAddress as EmailAddress,
- user_roles.RoleType as role
- FROM
- users
- LEFT JOIN user_roles ON users.Username = user_roles.UserID
- WHERE
- Disabled = 0
-</select>
-
-<select id="ValidateUser" resultClass="boolean">
- SELECT
- count(Username)
- FROM
- users
- WHERE
- username = #username# AND password = #password#
- AND
- Disabled = 0
-</select>
-
-<insert id="AddNewUser" parameterClass="array">
- INSERT INTO
- users (Username, Password, EmailAddress)
- VALUES
- (#user.Name#, #password#, #user.EmailAddress#)
-</insert>
-
-<update id="DeleteUserByName">
- UPDATE users SET Disabled = 1 WHERE username = #value#
-</update>
-
-<insert id="RegisterAutoSignon" parameterClass="array">
- INSERT INTO
- signon (SessionToken, Username, LastSignOnDate)
- VALUES
- (#token#, #username#, NOW())
-</insert>
-
-<select id="ValidateAutoSignon" resultMap="time-tracker-user">
- SELECT
- users.Username as Name,
- users.EmailAddress as EmailAddress,
- user_roles.RoleType as role
- FROM
- users LEFT JOIN user_roles ON users.Username = user_roles.UserID,
- signon
- WHERE
- users.Username = signon.Username
- AND signon.SessionToken = #value#
- AND users.Disabled = 0
-</select>
-
-<update id="UpdateSignon">
- UPDATE signon SET LastSignOnDate = NOW()
- WHERE SessionToken = #value#
-</update>
-
-<delete id="DeleteUserRoles" parameterClass="TimeTrackerUser">
- DELETE FROM user_roles WHERE UserID = #Name#
-</delete>
-
-<update id="AddUserRole" parameterClass="array">
- INSERT INTO user_roles (UserID, RoleType)
- VALUES(#username#, #role#)
-</update>
-
-<update id="UpdateUserDetails" parameterClass="TimeTrackerUser">
- UPDATE users
- SET EmailAddress = #EmailAddress#
- WHERE Username = #Name#
-</update>
-
-<update id="UpdateUserDetailsAndPassword" parameterClass="array">
- UPDATE users
- SET EmailAddress = #user.EmailAddress#, Password=#password#
- WHERE Username = #user.Name#
-</update>
-
-<delete id="DeleteAutoSignon">
- DELETE FROM signon WHERE Username = #value#
-</delete>
-
-<delete id="DeleteAllSignon">
- DELETE FROM signon
-</delete>
-
-</sqlMap> \ No newline at end of file