diff --git a/conf/lang/en-us.ini b/conf/lang/en-us.ini index 33d4da30..5da39714 100644 --- a/conf/lang/en-us.ini +++ b/conf/lang/en-us.ini @@ -497,6 +497,7 @@ status = Status super_admin = Super administrator admin = Administrator user = User +read_usr = Read-Only User normal = Normal disable = Disable enable = Enable diff --git a/conf/lang/ru-ru.ini b/conf/lang/ru-ru.ini index 12fbc58e..ecacf587 100644 --- a/conf/lang/ru-ru.ini +++ b/conf/lang/ru-ru.ini @@ -497,6 +497,7 @@ status = Статус super_admin = Супер администратор admin = Администратор user = Пользователь +read_usr = Пользователи только для чтения normal = Нормальный disable = Отключено enable = Включено diff --git a/models/Member.go b/models/Member.go index 90139a4b..b3eb6264 100644 --- a/models/Member.go +++ b/models/Member.go @@ -475,7 +475,7 @@ func (m *Member) Valid(is_hash_password bool) error { if strings.Count(m.Description, "") > 500 { return ErrMemberDescriptionTooLong } - if m.Role != conf.MemberGeneralRole && m.Role != conf.MemberSuperRole && m.Role != conf.MemberAdminRole { + if m.Role != conf.MemberGeneralRole && m.Role != conf.MemberSuperRole && m.Role != conf.MemberAdminRole && m.Role != conf.MemberReaderRole { return ErrMemberRoleError } if m.Status != 0 && m.Status != 1 {