]> source.dussan.org Git - gitea.git/commit
Restrict permission check on repositories and fix some problems (#5314)
authorLunny Xiao <xiaolunwen@gmail.com>
Wed, 28 Nov 2018 11:26:14 +0000 (19:26 +0800)
committerGitHub <noreply@github.com>
Wed, 28 Nov 2018 11:26:14 +0000 (19:26 +0800)
commiteabbddcd98717ef20d8475e819f403c50f4a9787
treeefc525e7ec60d56d3bec72019febfa088a128b89
parent0222623be9fa4a56d870213f77b92139cefc2518
Restrict permission check on repositories and fix some problems (#5314)

* fix units permission problems

* fix some bugs and merge LoadUnits to repoAssignment

* refactor permission struct and add some copyright heads

* remove unused codes

* fix routes units check

* improve permission check

* add unit tests for permission

* fix typo

* fix tests

* fix some routes

* fix api permission check

* improve permission check

* fix some permission check

* fix tests

* fix tests

* improve some permission check

* fix some permission check

* refactor AccessLevel

* fix bug

* fix tests

* fix tests

* fix tests

* fix AccessLevel

* rename CanAccess

* fix tests

* fix comment

* fix bug

* add missing unit for test repos

* fix bug

* rename some functions

* fix routes check
80 files changed:
cmd/serv.go
integrations/api_repo_test.go
models/access.go
models/access_test.go
models/branches.go
models/fixtures/repo_unit.yml
models/fixtures/repository.yml
models/fixtures/team.yml
models/fixtures/team_repo.yml
models/fixtures/team_unit.yml
models/fixtures/team_user.yml
models/fixtures/user.yml
models/issue.go
models/issue_assignees.go
models/issue_comment.go
models/issue_milestone.go
models/lfs_lock.go
models/org_team.go
models/org_team_test.go
models/org_test.go
models/pull.go
models/release.go
models/repo.go
models/repo_permission.go [new file with mode: 0644]
models/repo_permission_test.go [new file with mode: 0644]
models/repo_unit.go
models/ssh_key.go
models/user.go
models/user_test.go
modules/context/permission.go [new file with mode: 0644]
modules/context/repo.go
modules/lfs/server.go
modules/private/internal.go
modules/test/context_tests.go
routers/api/v1/api.go
routers/api/v1/org/team.go
routers/api/v1/repo/collaborators.go
routers/api/v1/repo/file.go
routers/api/v1/repo/fork.go
routers/api/v1/repo/issue.go
routers/api/v1/repo/issue_label.go
routers/api/v1/repo/label.go
routers/api/v1/repo/pull.go
routers/api/v1/repo/release.go
routers/api/v1/repo/repo.go
routers/api/v1/user/repo.go
routers/api/v1/user/star.go
routers/api/v1/user/watch.go
routers/private/internal.go
routers/repo/activity.go
routers/repo/branch.go
routers/repo/http.go
routers/repo/issue.go
routers/repo/issue_watch.go
routers/repo/pull.go
routers/repo/release.go
routers/repo/setting_protected_branch.go
routers/repo/view.go
routers/repo/wiki.go
routers/routes/routes.go
routers/user/home.go
templates/repo/activity.tmpl
templates/repo/bare.tmpl
templates/repo/diff/comments.tmpl
templates/repo/header.tmpl
templates/repo/home.tmpl
templates/repo/issue/labels.tmpl
templates/repo/issue/milestone_new.tmpl
templates/repo/issue/milestones.tmpl
templates/repo/issue/view_content.tmpl
templates/repo/issue/view_content/comments.tmpl
templates/repo/issue/view_content/sidebar.tmpl
templates/repo/issue/view_title.tmpl
templates/repo/release/list.tmpl
templates/repo/settings/options.tmpl
templates/repo/settings/webhook/history.tmpl
templates/repo/sub_menu.tmpl
templates/repo/wiki/pages.tmpl
templates/repo/wiki/start.tmpl
templates/repo/wiki/view.tmpl