* role refactor

* add missing file

* fix web test
Этот коммит содержится в:
Chris
2017-11-21 13:08:32 -06:00
коммит произвёл Christopher Speller
родитель 01e652ed48
Коммит 816a30397d
38 изменённых файлов: 466 добавлений и 499 удалений

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

@@ -129,12 +129,12 @@ func (s SqlChannelStore) CreateDirectChannel(userId string, otherUserId string)
cm1 := &model.ChannelMember{
UserId: userId,
NotifyProps: model.GetDefaultChannelNotifyProps(),
Roles: model.ROLE_CHANNEL_USER.Id,
Roles: model.CHANNEL_USER_ROLE_ID,
}
cm2 := &model.ChannelMember{
UserId: otherUserId,
NotifyProps: model.GetDefaultChannelNotifyProps(),
Roles: model.ROLE_CHANNEL_USER.Id,
Roles: model.CHANNEL_USER_ROLE_ID,
}
return s.SaveDirectChannel(channel, cm1, cm2)

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

@@ -914,7 +914,7 @@ func testUserStoreGetSystemAdminProfiles(t *testing.T, ss store.Store) {
u1 := &model.User{}
u1.Email = model.NewId()
u1.Roles = model.ROLE_SYSTEM_USER.Id + " " + model.ROLE_SYSTEM_ADMIN.Id
u1.Roles = model.SYSTEM_USER_ROLE_ID + " " + model.SYSTEM_ADMIN_ROLE_ID
store.Must(ss.User().Save(u1))
store.Must(ss.Team().SaveMember(&model.TeamMember{TeamId: teamId, UserId: u1.Id}, -1))