forked from vikunja/vikunja
Compare commits
4 Commits
8cefe76af5
...
4b72a28f04
Author | SHA1 | Date | |
---|---|---|---|
|
4b72a28f04 | ||
|
25f0c0480c | ||
|
76a7f1ae96 | ||
|
7114847807 |
|
@ -63,7 +63,7 @@ service:
|
||||||
# Allow using a custom logo via external URL.
|
# Allow using a custom logo via external URL.
|
||||||
customlogourl: ''
|
customlogourl: ''
|
||||||
# Enables the public team feature. If enabled, it is possible to configure teams to be public, which makes them
|
# Enables the public team feature. If enabled, it is possible to configure teams to be public, which makes them
|
||||||
# discoverable when sharing a project, therefore not only showing teams the user is member of.
|
# discoverable when sharing a project, therefore not only showing teams the user is member of.
|
||||||
enablepublicteams: false
|
enablepublicteams: false
|
||||||
|
|
||||||
sentry:
|
sentry:
|
||||||
|
|
|
@ -922,7 +922,7 @@
|
||||||
"admin": "Admin",
|
"admin": "Admin",
|
||||||
"member": "Member",
|
"member": "Member",
|
||||||
"isPublic": "Visibility",
|
"isPublic": "Visibility",
|
||||||
"isPublicDescription": "Make team publicly discoverable"
|
"isPublicDescription": "Make the team publicly discoverable. When enabled, anyone can share projects with this team even when not being a direct member."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"keyboardShortcuts": {
|
"keyboardShortcuts": {
|
||||||
|
|
|
@ -329,8 +329,6 @@ async function save() {
|
||||||
}
|
}
|
||||||
showErrorTeamnameRequired.value = false
|
showErrorTeamnameRequired.value = false
|
||||||
|
|
||||||
console.log('team.value', team.value)
|
|
||||||
|
|
||||||
team.value = await teamService.value.update(team.value)
|
team.value = await teamService.value.update(team.value)
|
||||||
success({message: t('team.edit.success')})
|
success({message: t('team.edit.success')})
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ func TestTeam_ReadAll(t *testing.T) {
|
||||||
assert.Len(t, ts, 1)
|
assert.Len(t, ts, 1)
|
||||||
assert.Equal(t, int64(2), ts[0].ID)
|
assert.Equal(t, int64(2), ts[0].ID)
|
||||||
})
|
})
|
||||||
t.Run("public", func(t *testing.T) {
|
t.Run("public discovery disabled", func(t *testing.T) {
|
||||||
|
|
||||||
s := db.NewSession()
|
s := db.NewSession()
|
||||||
defer s.Close()
|
defer s.Close()
|
||||||
|
@ -173,16 +173,24 @@ func TestTeam_ReadAll(t *testing.T) {
|
||||||
assert.Equal(t, reflect.Slice, reflect.TypeOf(teams).Kind())
|
assert.Equal(t, reflect.Slice, reflect.TypeOf(teams).Kind())
|
||||||
ts = teams.([]*Team)
|
ts = teams.([]*Team)
|
||||||
assert.Len(t, ts, 5)
|
assert.Len(t, ts, 5)
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("public discovery enabled", func(t *testing.T) {
|
||||||
|
|
||||||
|
s := db.NewSession()
|
||||||
|
defer s.Close()
|
||||||
|
|
||||||
|
team := &Team{}
|
||||||
|
|
||||||
// Enable ServiceEnablePublicTeams feature
|
// Enable ServiceEnablePublicTeams feature
|
||||||
config.ServiceEnablePublicTeams.Set(true)
|
config.ServiceEnablePublicTeams.Set(true)
|
||||||
|
|
||||||
// Fetch without public flag should still be the same
|
// Fetch without public flag should be the same as before
|
||||||
team.IncludePublic = false
|
team.IncludePublic = false
|
||||||
teams, _, _, err = team.ReadAll(s, doer, "", 1, 50)
|
teams, _, _, err := team.ReadAll(s, doer, "", 1, 50)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Equal(t, reflect.Slice, reflect.TypeOf(teams).Kind())
|
assert.Equal(t, reflect.Slice, reflect.TypeOf(teams).Kind())
|
||||||
ts = teams.([]*Team)
|
ts := teams.([]*Team)
|
||||||
assert.Len(t, ts, 5)
|
assert.Len(t, ts, 5)
|
||||||
|
|
||||||
// Fetch with public flag should return more teams
|
// Fetch with public flag should return more teams
|
||||||
|
|
Loading…
Reference in New Issue
Block a user