summaryrefslogtreecommitdiffstats
path: root/integrations/privateactivity_test.go
diff options
context:
space:
mode:
authorNorwin <noerw@users.noreply.github.com>2020-12-22 02:53:37 +0000
committerGitHub <noreply@github.com>2020-12-22 03:53:37 +0100
commitf6bec8529697bdb89ebcd0901ba093f06aa9ac46 (patch)
treed742367805a8296411211d5157c505f252f24dbf /integrations/privateactivity_test.go
parent2c9dd71140474b1f83f068bece40b25e94240ab4 (diff)
downloadgitea-f6bec8529697bdb89ebcd0901ba093f06aa9ac46.tar.gz
gitea-f6bec8529697bdb89ebcd0901ba093f06aa9ac46.zip
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
Diffstat (limited to 'integrations/privateactivity_test.go')
-rw-r--r--integrations/privateactivity_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integrations/privateactivity_test.go b/integrations/privateactivity_test.go
index bfdc2ef53e..381cb6b338 100644
--- a/integrations/privateactivity_test.go
+++ b/integrations/privateactivity_test.go
@@ -388,7 +388,7 @@ func TestPrivateActivityYesHeatmapHasNoContentForUserItself(t *testing.T) {
session := loginUser(t, privateActivityTestUser)
hasContent := testPrivateActivityHelperHasHeatmapContentFromSession(t, session)
- assert.False(t, hasContent, "user should have no heatmap content")
+ assert.True(t, hasContent, "user should see their own heatmap content")
}
func TestPrivateActivityYesHeatmapHasNoContentForOtherUser(t *testing.T) {
@@ -399,7 +399,7 @@ func TestPrivateActivityYesHeatmapHasNoContentForOtherUser(t *testing.T) {
session := loginUser(t, privateActivityTestOtherUser)
hasContent := testPrivateActivityHelperHasHeatmapContentFromSession(t, session)
- assert.False(t, hasContent, "user should have no heatmap content")
+ assert.False(t, hasContent, "other user should not see heatmap content")
}
func TestPrivateActivityYesHeatmapHasNoContentForAdmin(t *testing.T) {
@@ -410,5 +410,5 @@ func TestPrivateActivityYesHeatmapHasNoContentForAdmin(t *testing.T) {
session := loginUser(t, privateActivityTestAdmin)
hasContent := testPrivateActivityHelperHasHeatmapContentFromSession(t, session)
- assert.False(t, hasContent, "user should have no heatmap content")
+ assert.True(t, hasContent, "heatmap should show content for admin")
}