diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-01-18 00:33:59 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-18 00:33:59 +1300 |
commit | 2cdc0c93b759dfbdaff0c5577862b151d9aadf7f (patch) | |
tree | b397ec630e858c76d7ea3ca29305def271f08f62 /setup/default.xml | |
parent | 09a5ceb7b1681cb50338f37f775e13a5121e4385 (diff) | |
parent | 68abcc05ddd3633167f4e1c45d0ae9cf05dbcc43 (diff) | |
download | trackermap-server-2cdc0c93b759dfbdaff0c5577862b151d9aadf7f.tar.gz trackermap-server-2cdc0c93b759dfbdaff0c5577862b151d9aadf7f.tar.bz2 trackermap-server-2cdc0c93b759dfbdaff0c5577862b151d9aadf7f.zip |
Merge pull request #2801 from Abyss777/manager
Implement user management
Diffstat (limited to 'setup/default.xml')
-rw-r--r-- | setup/default.xml | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/setup/default.xml b/setup/default.xml index 1572ae60c..0ab3163f0 100644 --- a/setup/default.xml +++ b/setup/default.xml @@ -64,8 +64,8 @@ </entry> <entry key='database.insertUser'> - INSERT INTO users (name, email, hashedPassword, salt, readonly, admin, map, distanceUnit, speedUnit, latitude, longitude, zoom, twelveHourFormat, coordinateFormat, disabled, expirationTime, deviceLimit, token, attributes) - VALUES (:name, :email, :hashedPassword, :salt, :readonly, :admin, :map, :distanceUnit, :speedUnit, :latitude, :longitude, :zoom, :twelveHourFormat, :coordinateFormat, :disabled, :expirationTime, :deviceLimit, :token, :attributes) + INSERT INTO users (name, email, hashedPassword, salt, readonly, admin, map, distanceUnit, speedUnit, latitude, longitude, zoom, twelveHourFormat, coordinateFormat, disabled, expirationTime, deviceLimit, userLimit, token, attributes) + VALUES (:name, :email, :hashedPassword, :salt, :readonly, :admin, :map, :distanceUnit, :speedUnit, :latitude, :longitude, :zoom, :twelveHourFormat, :coordinateFormat, :disabled, :expirationTime, :deviceLimit, :userLimit, :token, :attributes) </entry> <entry key='database.updateUser'> @@ -85,6 +85,7 @@ disabled = :disabled, expirationTime = :expirationTime, deviceLimit = :deviceLimit, + userLimit = :userLimit, token = :token, attributes = :attributes WHERE id = :id @@ -350,6 +351,18 @@ <entry key='database.unlinkCalendar'> DELETE FROM user_calendar WHERE userId = :userId AND calendarId = :calendarId </entry> + + <entry key='database.selectUserPermissions'> + SELECT userId, managedUserId FROM user_user + </entry> + + <entry key='database.linkUser'> + INSERT INTO user_user (userId, managedUserId) VALUES (:userId, :managedUserId) + </entry> + + <entry key='database.unlinkUser'> + DELETE FROM user_user WHERE userId = :userId AND managedUserId = :managedUserId + </entry> <!-- PROTOCOL CONFIG --> |