Commit graph

4 commits

Author SHA1 Message Date
Simon Ser 998546cdc3
Introduce User.Created
For Network and Channel, the database only needed to define one Store
operation to create/update a record. However since User is missing an ID
we couldn't have a single StoreUser function like other types. We had
CreateUser and UpdatePassword. As new User fields get added (e.g. the
upcoming Admin flag) this isn't sustainable.

We could have CreateUser and UpdateUser, but this wouldn't be consistent
with other types. Instead, introduce User.Created which indicates
whether the record is already stored in the DB. This can be used in a
new StoreUser function to decide whether we need to UPDATE or INSERT
without relying on SQL constraints and INSERT OR UPDATE.

The ListUsers and GetUser functions set User.Created to true.
2020-06-08 11:59:03 +02:00
Thorben Günther 1622b772ab Allow to read password when stdin is not a tty. 2020-06-03 15:51:56 +02:00
Thorben Günther 148bbc8102
Add ability to change password 2020-04-10 10:09:02 +02:00
Simon Ser f3940117d1
Rename project to soju 2020-03-13 18:13:03 +01:00
Renamed from cmd/jouncectl/main.go (Browse further)