summaryrefslogtreecommitdiffstats
path: root/routers/admin
Commit message (Collapse)AuthorAgeFilesLines
* fix #3200 (#6033)Lanre Adelowo2019-02-111-1/+1
|
* Support reverse proxy providing email (#5554)zeripath2018-12-181-0/+1
| | | This PR implements #2347
* Allow admin toggle forcing a password change for newly created users (#4563)Lanre Adelowo2018-09-132-7/+45
|
* Force user to change password (#4489)Lanre Adelowo2018-09-133-5/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * redirect to login page after successfully activating account * force users to change password if account was created by an admin * force users to change password if account was created by an admin * fixed build * fixed build * fix pending issues with translation and wrong routes * make sure path check is safe * remove unneccessary newline * make sure users that don't have to view the form get redirected * move route to use /settings prefix so as to make sure unauthenticated users can't view the page * update as per @lafriks review * add necessary comment * remove unrelated changes * support redirecting to location the user actually want to go to before being forced to change his/her password * run make fmt * added tests * improve assertions * add assertion * fix copyright year Signed-off-by: Lanre Adelowo <yo@lanre.wtf>
* LDAP Public SSH Keys synchronization (#1844)Magnus Lindvall2018-05-241-18/+19
| | | | | | | | | | | | | | | | | | | * Add LDAP Key Synchronization feature Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Add migration: add login source id column for public_key table * Only update keys if needed * Add function to only list pubkey synchronized from ldap * Only list pub ssh keys synchronized from ldap. Do not sort strings as ExistsInSlice does it. * Only get keys belonging to current login source id * Set default login source id to 0 * Some minor cleanup. Add integration tests (updete dep testify)
* Add option to use paged LDAP search when synchronizing users (#3895)Lauris BH2018-05-051-0/+5
|
* Add admin dashboard option to run health checks (#3606)Allen Wild2018-03-021-0/+4
| | | | | There's one for git gc, why not git fsck too? Also add a couple more trace logs to GitFsck to see progress
* Cleanup models.User.HashPassword (#3334)Kim "BKC" Carlbäcker2018-01-121-2/+1
|
* Handle refactor (#3339)Morgan Bazalgette2018-01-104-20/+20
| | | | | | * Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
* Change EncodePasswd to HashPassword (#3329)Morgan Bazalgette2018-01-081-1/+1
| | | | | | * Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
* Enable admin to search by email (#2888)Ethan Koenig2017-11-261-2/+3
|
* Add commit count caching (#2774)Lauris BH2017-10-261-3/+3
| | | | | | | | | | * Add commit count caching * Small refactoring * Add different key prefix for refs and commits * Add configuratuion option to allow to change caching time or disable it
* Hide unactive on explore users and some refactors (#2741)Lunny Xiao2017-10-242-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | * hide unactive on explore users and some refactors * fix test for removed Organizations * fix test for removed Organizations * fix imports * fix logic bug * refactor the toConds * Rename TestOrganizations to TestSearchUsers and add tests for users * fix other tests * fix other tests * fix watchers tests * fix comments and remove unused code
* Remove redudant functions and code (#2652)Morlinest2017-10-101-1/+0
| | | * Remove redudant functions and code
* Webhooks for repo creation/deletion (#1663)Ethan Koenig2017-09-032-2/+2
| | | | | | | | * Webhooks for repo creation/deletion * add createHookTask * Add handles for GetSlackPayload and GetDiscordPayload
* Make time diff translatable (#2057)Lauris BH2017-06-281-1/+1
|
* Display config file path on admin panel (#2030)Lunny Xiao2017-06-221-0/+1
|
* LDAP user synchronization (#1478)Lauris BH2017-05-102-4/+11
|
* Additional OAuth2 providers (#1010)Willem van Dreumel2017-05-011-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add google+ * sort signin oauth2 providers based on the name so order is always the same * update auth tip for google+ * add gitlab provider * add bitbucket provider (and some go fmt) * add twitter provider * add facebook provider * add dropbox provider * add openid connect provider incl. new format of tips section in "Add New Source" * lower the amount of disk storage for each session to prevent issues while building cross platform (and disk overflow) * imports according to goimport and code style * make it possible to set custom urls to gitlab and github provider (only these could have a different host) * split up oauth2 into multiple files * small typo in comment * fix indention * fix indentation * fix new line before external import * fix layout of signin part * update "broken" dependency
* fix: Admin can see all private repositories on Explore page. (#1026)Bo-Yi Wu2017-02-261-1/+0
| | | | | | * fix: Admin can see all private repositories on Explore page. * refactor: fix session
* Take back control of hooks (#1006)Lunny Xiao2017-02-231-2/+2
| | | | | | | | | | | | | | | | * git: delegate all server-side Git hooks (#1623) * create hooks directories * take control hooks back * fix lint * bug fixed and minor changes * fix imports style * fix migration scripts
* Oauth2 consumer (#679)Willem van Dreumel2017-02-221-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* feat: Able to disable non-admin to create new organization (#927)Bo-Yi Wu2017-02-141-0/+1
|
* feat: add git version on admin panel. (#921)Bo-Yi Wu2017-02-131-0/+1
|
* Refactor process package and introduce ProcessManager{} with tests (#75)Matthias Loibl2017-01-171-1/+1
| | | | | | | | | | * Add a process.Manager singleton with process.GetManager() * Use process.GetManager everywhere * Fix godoc comments for process module * Increment process counter id after locking the mutex
* Restrict creating organisations by user (#193)Schwobaland2016-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | * 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
* Added sorting to organizations, repos & users page (#222)Bwko2016-12-243-3/+0
|
* Fix string format verbs (#3637)Alexander Lunegov2016-12-221-1/+1
|
* Fix random string generator (#384)Denis Denisov2016-12-201-1/+5
| | | | | | | | | | | * Remove unused custom-alphabet feature of random string generator Fix random string generator Random string generator should return error if it fails to read random data via crypto/rand * Fixes variable (un)initialization mixed assign Update test GetRandomString
* golint fixed for modules/authLunny Xiao2016-11-271-1/+1
|
* Golint fixed for modules/setting (#262)Lunny Xiao2016-11-275-14/+14
| | | | | | * golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
* go lint fixed for routers/adminLunny Xiao2016-11-216-51/+73
|
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-106-36/+36
| | | | | | | - Update import paths from github.com/go-gitea to code.gitea.io - Fix import path for travis See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
* Ordering organizations and users by nameThibault Meyer2016-11-101-1/+1
|
* Fix type in unused constant name (#111)Sandro Santilli2016-11-071-14/+14
| | | | | | | | | | | | | | | | | | * Write LDAP, SMTP, PAM, DLDAP back to all uppercase * Fix type in unused constant name * Other MixCased fixes * Complete MixerCasing of template constants * Re uppercase LTS and LDAPS suffixes * Uppercase JSON suffix in constant names * Proper case LoginNoType * Prefix unexported template path constants with "tpl"
* And othersSandro Santilli2016-11-072-2/+2
|
* Security protocolsSandro Santilli2016-11-071-5/+5
|
* More mixageSandro Santilli2016-11-071-9/+9
|
* More...Sandro Santilli2016-11-072-6/+6
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-036-36/+36
|
* models/login_source: code improvementUnknwon2016-08-311-3/+2
|
* #3515 use alert instead 500 for duplicated login source nameUnknwon2016-08-311-2/+7
|
* Fix typo CacheInternal -> CacheInterval (#3432)Thibault Meyer2016-08-111-1/+1
|
* #3091 show Git configs on admin panelUnknwon2016-08-101-0/+2
|
* Add support for federated avatars (#3320)Sandro Santilli2016-08-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for federated avatars Fixes #3105 Removes avatar fetching duplication code Adds an "Enable Federated Avatar" checkbox in user settings (defaults to unchecked) Moves avatar settings all in the same form, making local and remote avatars mutually exclusive Renames UploadAvatarForm to AvatarForm as it's not anymore only for uploading * Run gofmt on all modified files * Move Avatar form in its own page * Add go-libravatar dependency to vendor/ dir Hopefully helps with accepting the contribution. See also #3214 * Revert "Add go-libravatar dependency to vendor/ dir" This reverts commit a8cb93ae640bbb90f7d25012fc257bda9fae9b82. * Make federated avatar setting a global configuration Removes the per-user setting * Move avatar handling back to base tool, disable federated avatar in offline mode * Format, handle error * Properly set fallback host * Use unsupported github.com mirror for importing go-libravatar * Remove comment showing life exists outside of github.com ... pity, but contribution would not be accepted otherwise * Use Combo for Get and Post methods over /avatar * FEDERATED_AVATAR -> ENABLE_FEDERATED_AVATAR * Fix persistance of federated avatar lookup checkbox at install time * Federated Avatars -> Enable Federated Avatars * Use len(string) == 0 instead of string == "" * Move import line where it belong See https://github.com/Unknwon/go-code-convention/blob/master/en-US/import_packages.md Pity the import url is still the unofficial one, but oh well... * Save a line (and waste much more expensive time) * Remove redundant parens * Remove an empty line * Remove empty lines * Reorder lines to make diff smaller * Remove another newline Unknwon review got me start a fight against newlines * Move DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR after OFFLINE_MODE On re-reading the diff I figured what Unknwon meant here: https://github.com/gogits/gogs/pull/3320/files#r73741106 * Remove newlines that weren't there before my intervention
* Refactor User.Id to User.IDUnknwon2016-07-242-2/+2
|
* Use struct for UI settingsUnknwon2016-07-244-5/+5
|
* #2937 able to prohibit user loginUnknwon2016-07-161-0/+1
|
* #2854 fix no mail notification when issue is closed/reopenedUnknwon2016-07-162-5/+3
|
* Use SecurityProtocol to replace UseSSL in LDAP configUnknwon2016-07-081-16/+35
| | | | Initially proposed by #2376 and fixes #3068 as well.