File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
sms-core/src/main/kotlin/team/msg/sms/domain Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
package team.msg.sms.domain.auth.usecase
2
2
3
3
import team.msg.sms.common.annotation.UseCase
4
+ import team.msg.sms.domain.auth.model.Role
4
5
import team.msg.sms.domain.certificate.service.CertificateService
5
6
import team.msg.sms.domain.file.service.ImageService
6
7
import team.msg.sms.domain.languagecertificate.service.LanguageCertificateService
@@ -29,7 +30,7 @@ class WithdrawalUseCase(
29
30
) {
30
31
fun execute () {
31
32
val user = userService.getCurrentUser()
32
- if (user.roles[0 ].name == " ROLE_STUDENT" ) {
33
+ if (user.roles[0 ] == Role . ROLE_STUDENT ) {
33
34
val student = studentService.getStudentByUser(user)
34
35
val project = projectService.getAllProjectByStudentId(student.id)
35
36
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class GetUserServiceImpl(
18
18
) : GetUserService {
19
19
override fun getRoleByGAuthInfo (email : String , role : String ): Role {
20
20
val user = queryUserPort.queryUserByEmail(email) ? : return when (role) {
21
- " ROLE_STUDENT" -> Role .ROLE_STUDENT
21
+ " ROLE_STUDENT" , " ROLE_GRADUATE " -> Role .ROLE_STUDENT
22
22
" ROLE_TEACHER" -> Role .ROLE_TEACHER
23
23
else -> throw RoleNotExistsException
24
24
}
You can’t perform that action at this time.
0 commit comments