Commit Graph

37 Commits

Author SHA1 Message Date
Willem van Dreumel
01d957677f Oauth2 consumer (#679)
* initial stuff for oauth2 login, fails on:
* login button on the signIn page to start the OAuth2 flow and a callback for each provider
Only GitHub is implemented for now
* show login button only when the OAuth2 consumer is configured (and activated)
* create macaron group for oauth2 urls
* prevent net/http in modules (other then oauth2)
* use a new data sessions oauth2 folder for storing the oauth2 session data
* add missing 2FA when this is enabled on the user
* add password option for OAuth2 user , for use with git over http and login to the GUI
* add tip for registering a GitHub OAuth application
* at startup of Gitea register all configured providers and also on adding/deleting of new providers
* custom handling of errors in oauth2 request init + show better tip
* add ExternalLoginUser model and migration script to add it to database
* link a external account to an existing account (still need to handle wrong login and signup) and remove if user is removed
* remove the linked external account from the user his settings
* if user is unknown we allow him to register a new account or link it to some existing account
* sign up with button on signin page (als change OAuth2Provider structure so we can store basic stuff about providers)

* from gorilla/sessions docs:
"Important Note: If you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory!"
(we're using gorilla/sessions for storing oauth2 sessions)

* use updated goth lib that now supports getting the OAuth2 user if the AccessToken is still valid instead of re-authenticating (prevent flooding the OAuth2 provider)
2017-02-22 08:14:37 +01:00
Bo-Yi Wu
d67b278a0d feat: Able to disable non-admin to create new organization (#927) 2017-02-14 20:16:00 +08:00
Schwobaland
c0904f1942 Restrict creating organisations by user (#193)
* restrict creating organizations based on right on user

* revert bindata.go

* reverse vendor lib

* revert goimports change

* set AllowCreateOrganization default value to true

* revert locale

* added default value for AllowCreateOrganization

* fix typo in migration-comment

* fix comment

* add coments in migration
2016-12-31 10:33:30 +08:00
Joubert RedRat
f91cbf0fed Support to last login feature 2016-11-09 08:53:45 -02:00
Kim "BKC" Carlbäcker
562f9b6eae Merge all pagination-templates into 'base/paginate'
to reduce code-duplicity
2016-11-07 12:44:29 +01:00
Unknwon
1f2e173a74 Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
Unknwon
c083d76567 #2937 able to prohibit user login 2016-07-16 10:22:16 +08:00
Unknwon
2bf8494332 #13 finish user and repository search
Both are possible on explore and admin panel
2016-03-11 15:33:12 -05:00
Unknwon
59c965a5ec #2156 admin able to edit organization max repo creation 2015-12-11 19:24:57 -05:00
Unknwon
2a0bb1fa90 #1575 Limit repo creation 2015-12-10 12:37:53 -05:00
Adam Strzelecki
da2585c11e Indent all templates with tabs
This commit improves templates readability, since all of them use consistent
indent with all template command blocks indented too.

1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks
   such as {{if}} {{with}}

2. Cleans all trailing white-space

3. Adds trailing last line-break to each file
2015-12-08 00:57:46 +01:00
Unknwon
6f0a41b8b2 #1511 Allow local import only for admin users 2015-11-03 18:40:52 -05:00
Unknwon
21e13cb51e #1525 Triggere mailer for admin created accounts 2015-09-25 19:45:44 -04:00
Unknwon
83e747bfda #697 and #1606 and new admin edit user UI 2015-09-13 11:07:21 -04:00
Unknwon
e5ed5904c6 #1606 GUI bug while adding ldap user 2015-09-13 10:05:18 -04:00
Unknwon
1fa5b6711b fix html logic 2015-09-13 09:56:50 -04:00
Unknwon
8e0a69f86a #697 disable captcha and new admin create user UI 2015-09-13 09:51:51 -04:00
Unknwon
c7ac237b57 fix css 2015-09-11 20:49:28 -04:00
Unknwon
be89802bd8 new admin user list UI 2015-09-11 20:42:26 -04:00
Unknwon
50dbc2732b more fix on #1553 2015-09-01 08:13:45 -04:00
Unknwon
6c7a93a3ac fix #1553 2015-09-01 05:44:36 -04:00
James
f3aab5dbe3 Add full name field to admin's user edit page (fixes #1130) 2015-04-28 11:59:05 -04:00
Sternik
d0e34c57cc Fix for deleting user when gogs instalation is on http://hostname/gogs 2015-03-13 20:17:20 +01:00
Peter Smit
7759b9ee6e Remove the "PHP" style formatting function
The "PHP" formatting function doesn't add anything, except an undocumented date format.

All usages in the templates have been replaced with DateFmtShort and DateFmtLong for convenience.
2015-02-16 14:44:27 +02:00
Peter Smit
fd70f9ec1b Fix #799 by adding a tooltip for all dates in all settings/panels 2015-01-02 12:41:05 +02:00
Unknwon
0c92da7e9c fix invalid user links in admin panels 2014-11-19 21:19:37 -05:00
Unknwon
32dcaefafa fox #620 2014-11-17 14:53:41 -05:00
Unknwon
49193bebd2 UI: Confirmation box 2014-09-28 01:38:25 -04:00
Unknwon
5bbeeb0f1b Page: Commits and fix #249 2014-09-23 15:30:04 -04:00
Unknwon
7ba9257a7f Add suburl support 2014-09-19 20:11:34 -04:00
Martin van Beurden
0055cbd365 Allow Gogs to run from a suburl behind a reverse proxy. e.g. http://mydomain.com/gogs/
Conflicts:
	modules/setting/setting.go

Conflicts:
	templates/repo/release/list.tmpl
	templates/user/dashboard/dashboard.tmpl

Conflicts:
	routers/repo/setting.go
2014-09-18 20:50:48 +02:00
Unknwon
d2aff9a46a Continue working on new admin pages 2014-08-29 20:50:43 +08:00
Unknwon
8829174574 Finish new admin users pages 2014-08-29 15:32:52 +08:00
lunnyxiao
57f6ec672a bug fixed 2014-08-08 13:51:02 +08:00
gima
5a97cc69ed Make possible for administrators to change user's password (fix proposal for #290) 2014-07-18 05:30:57 +03:00
António Meireles
3ad20773a2 fix typos in users' editing template. 2014-06-30 20:12:55 +01:00
Unknown
9924e65ca1 In progress of name template name constant 2014-06-22 13:14:03 -04:00