forked from vikunja/vikunja
Compare commits
4 Commits
8cefe76af5
...
4b72a28f04
Author | SHA1 | Date |
---|---|---|
Daniel Herrmann | 4b72a28f04 | |
Daniel Herrmann | 25f0c0480c | |
Daniel Herrmann | 76a7f1ae96 | |
Daniel Herrmann | 7114847807 |
|
@ -63,7 +63,7 @@ service:
|
|||
# Allow using a custom logo via external URL.
|
||||
customlogourl: ''
|
||||
# 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
|
||||
|
||||
sentry:
|
||||
|
|
|
@ -922,7 +922,7 @@
|
|||
"admin": "Admin",
|
||||
"member": "Member",
|
||||
"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": {
|
||||
|
|
|
@ -329,8 +329,6 @@ async function save() {
|
|||
}
|
||||
showErrorTeamnameRequired.value = false
|
||||
|
||||
console.log('team.value', team.value)
|
||||
|
||||
team.value = await teamService.value.update(team.value)
|
||||
success({message: t('team.edit.success')})
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ func TestTeam_ReadAll(t *testing.T) {
|
|||
assert.Len(t, ts, 1)
|
||||
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()
|
||||
defer s.Close()
|
||||
|
@ -173,16 +173,24 @@ func TestTeam_ReadAll(t *testing.T) {
|
|||
assert.Equal(t, reflect.Slice, reflect.TypeOf(teams).Kind())
|
||||
ts = teams.([]*Team)
|
||||
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
|
||||
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
|
||||
teams, _, _, err = team.ReadAll(s, doer, "", 1, 50)
|
||||
teams, _, _, err := team.ReadAll(s, doer, "", 1, 50)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, reflect.Slice, reflect.TypeOf(teams).Kind())
|
||||
ts = teams.([]*Team)
|
||||
ts := teams.([]*Team)
|
||||
assert.Len(t, ts, 5)
|
||||
|
||||
// Fetch with public flag should return more teams
|
||||
|
|
Loading…
Reference in New Issue