Commit Graph

46 Commits

Author SHA1 Message Date
zeripath 704da08fdc
Better logging (#6038) (#6095)
* Panic don't fatal on create new logger

Fixes #5854

Signed-off-by: Andrew Thornton <art27@cantab.net>

* partial broken

* Update the logging infrastrcture

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Reset the skip levels for Fatal and Error

Signed-off-by: Andrew Thornton <art27@cantab.net>

* broken ncsa

* More log.Error fixes

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove nal

* set log-levels to lowercase

* Make console_test test all levels

* switch to lowercased levels

* OK now working

* Fix vetting issues

* Fix lint

* Fix tests

* change default logging to match current gitea

* Improve log testing

Signed-off-by: Andrew Thornton <art27@cantab.net>

* reset error skip levels to 0

* Update documentation and access logger configuration

* Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE

* Fix broken level caching

* Refactor the router log

* Add Router logger

* Add colorizing options

* Adjust router colors

* Only create logger if they will be used

* update app.ini.sample

* rename Attribute ColorAttribute

* Change from white to green for function

* Set fatal/error levels

* Restore initial trace logger

* Fix Trace arguments in modules/auth/auth.go

* Properly handle XORMLogger

* Improve admin/config page

* fix fmt

* Add auto-compression of old logs

* Update error log levels

* Remove the unnecessary skip argument from Error, Fatal and Critical

* Add stacktrace support

* Fix tests

* Remove x/sync from vendors?

* Add stderr option to console logger

* Use filepath.ToSlash to protect against Windows in tests

* Remove prefixed underscores from names in colors.go

* Remove not implemented database logger

This was removed from Gogs on 4 Mar 2016 but left in the configuration
since then.

* Ensure that log paths are relative to ROOT_PATH

* use path.Join

* rename jsonConfig to logConfig

* Rename "config" to "jsonConfig" to make it clearer

* Requested changes

* Requested changes: XormLogger

* Try to color the windows terminal

If successful default to colorizing the console logs

* fixup

* Colorize initially too

* update vendor

* Colorize logs on default and remove if this is not a colorizing logger

* Fix documentation

* fix test

* Use go-isatty to detect if on windows we are on msys or cygwin

* Fix spelling mistake

* Add missing vendors

* More changes

* Rationalise the ANSI writer protection

* Adjust colors on advice from @0x5c

* Make Flags a comma separated list

* Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING

* Ensure matching is done on the non-colored message - to simpify EXPRESSION
2019-04-02 08:48:31 +01:00
Lunny Xiao 134e55510e fix bug when update owner team then visit team's repo return 404 (#6119) 2019-02-22 11:14:45 -05:00
Lunny Xiao 7c0c965532 Improve team members and repositories settings UI (#5457)
* improve team members and repositories settings UI

* use tab on team pages

* add default description on team members and repos

* add blank on numbers and texts

* improve translation
2018-12-09 08:42:11 +02:00
Lanre Adelowo 6ca8fbd2f9 Fixed bug where team with admin privelege type doesn't get any unit attached to the team (#4719) 2018-08-21 13:02:32 -04:00
Lanre Adelowo a6cdda115d Display error when adding a user to a team twice (#4746) 2018-08-19 21:49:19 +03:00
David Schneiderbauer 0b3ea42847 hide issues from org private repos w/o team assignment (#4034) 2018-06-21 12:00:13 -04:00
Morgan Bazalgette 65861900cd Handle refactor (#3339)
* Replace all ctx.Handle with ctx.ServerError or ctx.NotFound

* Change Handle(403) to NotFound, avoid using macaron's NotFound
2018-01-10 23:34:17 +02:00
Sasha Varlamov 311c83ad17 Allow adding collaborators with (fullname) (#3103)
* Allow adding collaborators with (fullname)

Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>

* Refactor username suffix to utils pkg

Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>
2017-12-07 15:00:09 +08:00
Lunny Xiao 061c501d54 Fix error when add user has full name to team (#2973)
* fix error when add user has full name to team

* add comment for extra uname check
2017-11-26 10:01:48 +02:00
Lauris BH f33e6ae09e Remove unit types commits and settings (#2161)
* Remove unit types commits and settings

* Can not limit units in administrator teams

* Limit changing units only to teams with read and write access mode

* Small code optimization
2017-07-17 10:04:43 +08:00
Lunny Xiao 3611a3e552 fix bug to deny to add orgnization as a member of an orgnization or team (#1815) 2017-05-26 08:12:02 -05:00
Lunny Xiao fd6034aaf2 Add units to team (#947)
* add units to team

* fix lint

* finish team setting backend

* finished permission controll on routes

* fix import blank line

* add unit check on ssh/http pull and push and fix test failed

* fix fixtures data

* remove unused code
2017-05-18 22:54:24 +08:00
Lunny Xiao b40496533b fix leave team 404 (#1154) 2017-03-09 19:18:49 +08:00
Lunny Xiao cf045b029c golint fixed for parts of routers root, dev, user and org dirs (#167)
* golint fixed for parts of routers root, dev and org dirs

* add user/auth.go golint fixed

* rename unnecessary exported to unexported and user dir golint fixed
2016-11-18 11:03:03 +08:00
Sandro Santilli 4247304f5a Update import paths from github.com/go-gitea to code.gitea.io (#135)
- 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
2016-11-10 17:24:48 +01:00
Sandro Santilli f388661bda ACCESS_MODE_* -> AccessMode* 2016-11-07 17:20:37 +01:00
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
Unknwon 1f2e173a74 Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
Unknwon e6f927f61a #1692 api: admin list and create team under organization 2016-03-21 12:47:54 -04:00
Unknwon 514382e2eb Rename module: middleware -> context 2016-03-11 11:56:52 -05:00
Florian Kaiser fdad234445 Remove unnecessary comments 2016-01-31 19:08:20 +00:00
Florian Kaiser e35791b2b2 Only show teams the user has access to 2016-01-31 15:30:07 +00:00
Unknwon 112a7cab31 #2497 incorrect error handle for team name 2016-01-29 17:06:14 -05:00
Unknwon 52c8f69163 fix #650 2015-11-22 01:32:09 -05:00
Unknwon e50982f5ec allow anonymous SSH clone 2015-08-05 11:14:17 +08:00
Unknwon 466facc009 #1067: Deleting users should remove them from collaborator lists
- fix delete user but repository watches are not decreased
2015-03-17 21:51:39 -04:00
Unknwon 588f3215c6 #1040: dashboard no longer accessible when repo is missing 2015-03-16 04:04:27 -04:00
Unknwon ee68a826a5 v4 migration, merge 'dev', clean code and mirror fix 2015-02-23 02:15:53 -05:00
Peter Smit 6c1ee384f1 Merge remote-tracking branch 'mine/access_refactor' into access_refactor
Conflicts:
	cmd/serve.go
	models/access.go
	models/migrations/migrations.go
	models/org.go
	models/repo.go
	models/user.go
	modules/middleware/org.go
	modules/middleware/repo.go
	routers/api/v1/repo.go
	routers/org/teams.go
	routers/repo/http.go
	routers/user/home.go
2015-02-12 14:25:07 +02:00
Peter Smit 0a4cda0dd4 Refactoring of the Access Table
This commit does a lot of the work of refactoring the access table in a table with id's instead of strings.

The result does compile, but has not been tested. It may eat your kittens.
2015-02-12 14:14:45 +02:00
Unknwon 485ea6f14f models: make code change for session issue with SQLite3 #739 2015-02-10 23:44:16 -05:00
Peter Smit 0d158e569b Change constants to UPPERCASE_WITH_UNDERSCORE style 2015-02-09 13:36:33 +02:00
Peter Smit 4e79adf6b5 Refactoring of the Access Table
This commit does a lot of the work of refactoring the access table in a table with id's instead of strings.

The result does compile, but has not been tested. It may eat your kittens.
2015-02-06 13:18:11 +02:00
Unknwon 85c9f7c5f3 Issue: Show error prompt when add repository to team and it does not exist #533 2014-10-10 05:06:12 -04:00
Unknwon a2cac952a4 Prepare 0.5 release 2014-09-12 21:36:26 -04:00
Unknwon 74b31566cf Finsih add/remove repo in organization 2014-08-26 18:11:15 +08:00
Unknwon 21a1b8e5a3 Finish new edit team page, add member to team 2014-08-24 21:09:05 +08:00
Unknwon fa60502a70 Working on organization pages 2014-08-23 20:24:02 +08:00
Unknwon a60edbe88c Add/remove member need add/remove access to repositories as well 2014-08-16 16:58:32 +08:00
Unknwon bba707de36 Finish team list, create new team, join/leave team page 2014-08-16 16:21:17 +08:00
Unknwon 5c4bc3c848 Huge updates!!!!! Be careful to merge!!!! 2014-07-26 02:28:04 -04:00
fuxiaohei c127d84777 add organization team-single page 2014-07-07 18:13:42 +08:00
Unknown 465dc962b5 Finish create organization team 2014-07-02 16:42:16 -04:00
Unknown e4ea5cf598 Finish Teams page 2014-06-29 16:30:41 -04:00
fuxiaohei 1d55ecd29c add organization team-create page 2014-06-27 22:04:04 +08:00
fuxiaohei b5ba2bd268 add organization team-create page 2014-06-27 21:33:49 +08:00