David Svantesson
2bb9152c83
Recalculate repository access only for specific user ( #8481 )
* Recalculate repository access only for specific user
Signed-off-by: David Svantesson <davidsvantesson@gmail.com>
* Handle user repositories as well, and only add access if minimum mode
* Need to get repo owner to check if organization
5 years ago
zeripath
718c47861a
Trace Logging on Permission Denied & ColorFormat ( #6618 )
* Add log.ColorFormat and log.ColorFormatted
Structs can now implement log.ColorFormatted to provide their own
colored format when logged with `%-v` or additional flags.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add basic ColorFormat to repository and user
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add basic ColorFormat to access and unit
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add ColorFormat to permission and on trace log it
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add log.NewColoredIDValue to make ID value coloring consistent
Signed-off-by: Andrew Thornton <art27@cantab.net>
* formatting changes
* Add some better tracing to permission denied for read issues/pulls
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add Trace logging on permission denied
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove isTrace() check from deferred func
* Adjust repo and allow logging of team
* use FormatInt instead of Itoa
* Add blank line
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update access.go
6 years ago
Lunny Xiao
1c80f31f40
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
6 years ago
Ethan Koenig
c2ba9ca97b
Refactor and fix incorrect comment ( #1247 )
8 years ago
Ethan Koenig
1bd58cec9b
Fix SQL bug in models/access ( #583 )
Previously got a 'relation repo_access does not exist' error in User_GetRepositoryAccesses
8 years ago
Ethan Koenig
feb1506600
Fix typos in models/ ( #576 )
8 years ago
Lunny Xiao
6796ad1d90
Optimization for user.GetRepositoryAccesses to reduce db query times ( #495 )
* optimization for user.GetRepositoryAccesses to reduce db query times
* fix missing cache
8 years ago
Bwko
76170afa49
Lint models/access.go
8 years ago
Thibault Meyer
b747797b29
Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queries
# Conflicts:
# models/git_diff.go
# models/issue.go
# models/org.go
# models/pull.go
# models/repo.go
8 years ago
Thibault Meyer
5d29fda874
Rewrite XORM queries
8 years ago
Sandro Santilli
cb1b3cc148
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
8 years ago
Sandro Santilli
58cc4e56fa
ACCESS_MODE_* -> AccessMode*
8 years ago
Rémy Boulanouar
9712d5ee89
Change import reference to match gitea instead of gogs ( #37 )
8 years ago
Unknwon
027aebc72c
#1384 add pagination for repositories
9 years ago
Unknwon
3b42ab0e57
Refactor User.Id to User.ID
9 years ago
Unknwon
0b2c7a6284
#1692 api: admin list and create team under organization
9 years ago
Marin Jankovski
cd97a3e8a9
Updated and created were appended with _unix. Fresh databases have only the newly named fields.
9 years ago
Unknwon
ad91428936
#1146 finsih UI work for access mode of collaborators
Collaborators have write access as default, and can be changed via repository
collaboration settings page to change between read, write and admin.
9 years ago
Unknwon
14f5f6fec1
fix #1997
9 years ago
Unknwon
cd26a1f9b0
fix #1953
9 years ago
Unknwon
32c481117a
fix #1302
9 years ago
Unknwon
2cae65fde9
#1458 : Authorities were messed up when using mysql database
9 years ago
Unknwon
c2d2309120
minor fix on API response
9 years ago
Unknwon
36fa23ed16
WIP: create PR - choose branch
10 years ago
Unknwon
52c42becf9
#1369 : nil pointer when add repo to team
10 years ago
Unknwon
a1f76d122e
#1279 : Removing user from collaboration removes repositiory
10 years ago
Unknwon
d7027077ec
#1143 Team member access lost when adding repository collaborator
- fix bug when add a repo to team, all other team members gets access as well
10 years ago
Unknwon
0fa1c5ae0f
#1040 : dashboard no longer accessible when repo is missing
10 years ago
Unknwon
b5ec283915
REAMDE: update
10 years ago
Unknwon
1d80e7bfbd
models: done testing on new access system
10 years ago
Unknwon
08b8901cd9
models: fix issue with transfer repository
README: fix typo
10 years ago
Unknwon
56a29ce158
v4 migration, merge 'dev', clean code and mirror fix
10 years ago
Unknwon
cfe7f5e13d
some fixes, but not done yet!
10 years ago
Unknwon
7ae5b92db8
code fix #941 caution: undertest
10 years ago
Peter Smit
71ea4a71bd
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
10 years ago
Peter Smit
81083a9415
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.
10 years ago
Unknwon
4f24a5ef7d
first pass work on migration #925
10 years ago
Peter Smit
5af7b2864c
Change constants to UPPERCASE_WITH_UNDERSCORE style
10 years ago
Peter Smit
5deb52e1b8
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.
10 years ago
Peter Smit
fd1df86c44
Fix dashboard issue after collaboration migration
10 years ago
Peter Smit
76f8904718
Introducing Collaboration Struct
10 years ago
Unknwon
74b31566cf
Finsih add/remove repo in organization
10 years ago
Unknown
e0f9c628c5
Add create organization
11 years ago
Unknown
ad5ec45dd6
Fix #165
11 years ago
Unknown
914ffa496f
Show private repository activities in dashboard if has access
11 years ago
Unknown
e867283406
Assignee back end
11 years ago
Unknown
f6c4fbeb37
Collaborator
11 years ago
Unknown
49c01c0b57
Fix import path
11 years ago
Unknown
90f6aa8cd1
Add repo mirror and import
11 years ago
Unknown
33aa4f7438
Support private repo
11 years ago