1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-12 13:30:26 +00:00
Commit Graph

18 Commits

Author SHA1 Message Date
Timur Ismagilov
eb88cbf23e Views: Drop the *HTML suffix 2022-03-21 00:24:40 +03:00
Timur Ismagilov
51f5ebf46d Auth: Refactor login and logout
GET /login and POST /login-data are merged into /login.

GET /logout and POST /logout-confirm are merged into /logout.

The logout form now looks more consistent with other forms.

Used io.WriteString instead of Fprint where it wasn't like that for some reason.
2021-12-31 02:07:39 +05:00
Mikhail Chekan
85c936d94a Housekeeping with linter
'I do as the golint guides'
2021-10-02 01:14:26 +08:00
Umar Getagazov
33650e965c Run gofmt 2021-09-29 21:56:17 +07:00
Mikhail Chekan
bca1c23d36 Merge l18n with master updates 2021-09-27 17:24:02 +08:00
Mikhail Chekan
0780131c00 Initial l18n support 2021-09-27 16:45:23 +08:00
Timur Ismagilov
18179f1c7f Get rid of " in some places
Violently
2021-08-12 17:12:53 +05:00
handlerug
3ee21e312d Refactor the locking mechanism 2021-07-16 01:14:05 +07:00
handlerug
6fdab4be34 Migrate to gorilla/mux for web needs
What a wonderful package!
2021-07-16 00:47:00 +07:00
bouncepaw
5e450612a1 Mark user's source: local or telegram 2021-07-15 08:50:45 +00:00
bouncepaw
8059674925 Improve some forms 2021-07-15 08:50:45 +00:00
bouncepaw
df78f75efb Implement initial Telegram integration 2021-07-15 08:50:45 +00:00
Timur Ismagilov
5d45ae67d4 Make the lock work
There is a new config field: Authorization.Locked.

I am a little bit sorry for how actually the lock is implemented. I've added the check on almost every handler there is. Good luck maintaining that ❤️
2021-07-11 00:06:07 +05:00
Timur Ismagilov
d8f4f40f52 Implement the lock page
It is unused now, you can take a look at it on /lock
2021-07-11 00:06:07 +05:00
handlerug
d4fea3d24a
Add -create-admin flag
It allows for interactive creation of admin account from the terminal
for new wikis. Because we have a chicken-and-egg problem here with the
user panel -- you need an admin account to appoint someone as an admin,
right?
2021-07-02 17:25:13 +07:00
handlerug
b87583ef28
Drop fixed authorization
Important changes:
- UseFixedAuth is now UseAuth and toggles all kinds of authorization and
  registration
- UseRegistration is now AllowRegistration to better reflect the meaning
- LimitRegistration is now RegistrationLimit because it's not a boolean,
  it's a value (not "limit registration?", but "registration limit is
  ...")
- registered-users.json is now users.json, because all users are stored
  there
- user.AuthUsed is dropped in favor of new cfg.UseAuth which has the
  same meaning

I hope I have not forgotten anything.
2021-07-02 15:20:03 +07:00
handlerug
7073f9bce0
Actually check for illegal username, pretty errors 2021-07-01 15:45:03 +07:00
Timur Ismagilov
a1852d363e Refactor and document some stuff 2021-05-11 13:33:00 +05:00