]> source.dussan.org Git - gitea.git/commit
rework heatmap permissions (#14080)
authorNorwin <noerw@users.noreply.github.com>
Tue, 22 Dec 2020 02:53:37 +0000 (02:53 +0000)
committerGitHub <noreply@github.com>
Tue, 22 Dec 2020 02:53:37 +0000 (03:53 +0100)
commitf6bec8529697bdb89ebcd0901ba093f06aa9ac46
treed742367805a8296411211d5157c505f252f24dbf
parent2c9dd71140474b1f83f068bece40b25e94240ab4
rework heatmap permissions (#14080)

* now uses the same permission model as for the activity feed:
  only include activities in repos, that the doer has access to.
  this might be somewhat slower.

* also improves handling of user.KeepActivityPrivate (still shows
  the heatmap to self & admins)

* extend tests

* adjust integration test to new behaviour

* add access to actions for admins

* extend heatmap unit tests
integrations/privateactivity_test.go
models/action.go
models/fixtures/action.yml
models/user_heatmap.go
models/user_heatmap_test.go
routers/api/v1/user/user.go
routers/user/home.go
routers/user/profile.go