Added forbiden urls and protected
This commit is contained in:
@ -11,4 +11,7 @@ import org.springframework.stereotype.Repository;
|
||||
public interface UserRepository extends JpaRepository<User, Long> {
|
||||
@Query("FROM User WHERE email = ?1")
|
||||
User getByAuthority(@Param("authority") String authority);
|
||||
|
||||
@Query("FROM User WHERE token = ?1")
|
||||
User getByToken(@Param("token") String token);
|
||||
}
|
@ -38,4 +38,8 @@ public class UserService extends EventWatcher {
|
||||
return this.repo.getByAuthority(email.replace("\n", "").trim());
|
||||
}
|
||||
|
||||
public User getByToken(String token) {
|
||||
return this.repo.getByToken(token);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user