Revert "Add read_channel_content permission (#24018)" (#24114)

This reverts commit a19ce047ba.
Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2023-07-25 13:17:58 +03:00
коммит произвёл GitHub
родитель 26617fcbdc
Коммит 2a4de2eecc
24 изменённых файлов: 74 добавлений и 122 удалений

Просмотреть файл

@@ -258,7 +258,6 @@ func createDefaultRoles(ss store.Store) {
DisplayName: model.ChannelUserRoleId,
Permissions: []string{
model.PermissionReadChannel.Id,
model.PermissionReadChannelContent.Id,
model.PermissionCreatePost.Id,
},
})
@@ -268,7 +267,6 @@ func createDefaultRoles(ss store.Store) {
DisplayName: model.ChannelGuestRoleId,
Permissions: []string{
model.PermissionReadChannel.Id,
model.PermissionReadChannelContent.Id,
model.PermissionCreatePost.Id,
},
})

Просмотреть файл

@@ -67,7 +67,6 @@ func createDefaultRoles(ss store.Store) {
DisplayName: model.ChannelUserRoleId,
Permissions: []string{
model.PermissionReadChannel.Id,
model.PermissionReadChannelContent.Id,
model.PermissionCreatePost.Id,
},
})
@@ -77,7 +76,6 @@ func createDefaultRoles(ss store.Store) {
DisplayName: model.ChannelGuestRoleId,
Permissions: []string{
model.PermissionReadChannel.Id,
model.PermissionReadChannelContent.Id,
model.PermissionCreatePost.Id,
},
})
@@ -160,7 +158,7 @@ func testSchemeStoreSave(t *testing.T, ss store.Store) {
role4, err := ss.Role().GetByName(context.Background(), d1.DefaultChannelUserRole)
assert.NoError(t, err)
assert.Equal(t, role4.Permissions, []string{"read_channel", "read_channel_content", "create_post"})
assert.Equal(t, role4.Permissions, []string{"read_channel", "create_post"})
assert.True(t, role4.SchemeManaged)
role5, err := ss.Role().GetByName(context.Background(), d1.DefaultTeamGuestRole)
@@ -170,7 +168,7 @@ func testSchemeStoreSave(t *testing.T, ss store.Store) {
role6, err := ss.Role().GetByName(context.Background(), d1.DefaultChannelGuestRole)
assert.NoError(t, err)
assert.Equal(t, role6.Permissions, []string{"read_channel", "read_channel_content", "create_post"})
assert.Equal(t, role6.Permissions, []string{"read_channel", "create_post"})
assert.True(t, role6.SchemeManaged)
// Change the scheme description and update.
@@ -388,7 +386,7 @@ func testSchemeStoreDelete(t *testing.T, ss store.Store) {
role4, err := ss.Role().GetByName(context.Background(), d1.DefaultChannelUserRole)
assert.NoError(t, err)
assert.Equal(t, role4.Permissions, []string{"read_channel", "read_channel_content", "create_post"})
assert.Equal(t, role4.Permissions, []string{"read_channel", "create_post"})
assert.True(t, role4.SchemeManaged)
role5, err := ss.Role().GetByName(context.Background(), d1.DefaultTeamGuestRole)
@@ -398,7 +396,7 @@ func testSchemeStoreDelete(t *testing.T, ss store.Store) {
role6, err := ss.Role().GetByName(context.Background(), d1.DefaultChannelGuestRole)
assert.NoError(t, err)
assert.Equal(t, role6.Permissions, []string{"read_channel", "read_channel_content", "create_post"})
assert.Equal(t, role6.Permissions, []string{"read_channel", "create_post"})
assert.True(t, role6.SchemeManaged)
// Delete the scheme.