Skip to content

Commit

Permalink
Merge branch 'hotfix/admin_identify' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/usw/suwiki/domain/user/user/User.java
  • Loading branch information
wonslee committed Feb 14, 2024
2 parents 6d211fc + 785a1b8 commit 5243d71
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/main/java/usw/suwiki/domain/user/user/User.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
package usw.suwiki.domain.user.user;

import static usw.suwiki.global.exception.ExceptionType.EMAIL_NOT_AUTHED;
import static usw.suwiki.global.exception.ExceptionType.USER_POINT_LACK;
import static usw.suwiki.global.util.passwordfactory.PasswordRandomizer.randomizePassword;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
Expand All @@ -14,14 +29,6 @@
import usw.suwiki.domain.timetable.entity.Timetable;
import usw.suwiki.global.exception.errortype.AccountException;

import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.Optional;

import static usw.suwiki.global.exception.ExceptionType.EMAIL_NOT_AUTHED;
import static usw.suwiki.global.exception.ExceptionType.USER_POINT_LACK;
import static usw.suwiki.global.util.passwordfactory.PasswordRandomizer.randomizePassword;

@Entity
@Getter
@Builder
Expand Down Expand Up @@ -141,7 +148,7 @@ public void activateUser() {
}

public boolean isAdmin() {
return this.role.getKey().equals(Role.ADMIN);
return this.role.equals(Role.ADMIN);
}

/**
Expand Down

0 comments on commit 5243d71

Please sign in to comment.