Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix : 호스트 이벤트 접근 권한 설정 #459

Merged
merged 3 commits into from
Feb 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public HostDetailResponse patchHostUserRole(
return updateHostUserRoleUseCase.execute(hostId, updateHostUserRoleRequest);
}

// todo :: 슈퍼 호스트 이상으로?
@Operation(summary = "호스트 정보를 변경합니다. 매니저 이상만 가능합니다.")
@PatchMapping("/{hostId}/profile")
public HostDetailResponse patchHostById(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package band.gosrock.api.host.service;

import static band.gosrock.api.common.aop.hostRole.FindHostFrom.HOST_ID;
import static band.gosrock.api.common.aop.hostRole.HostQualification.GUEST;

import band.gosrock.api.common.aop.hostRole.HostRolesAllowed;
import band.gosrock.api.common.page.PageResponse;
import band.gosrock.api.host.model.dto.response.HostEventProfileResponse;
import band.gosrock.common.annotation.UseCase;
Expand All @@ -18,6 +21,7 @@ public class ReadHostEventsUseCase {
private final HostAdaptor hostAdaptor;
private final EventAdaptor eventAdaptor;

@HostRolesAllowed(role = GUEST, findHostFrom = HOST_ID)
public PageResponse<HostEventProfileResponse> execute(Long hostId, Pageable pageable) {
Host host = hostAdaptor.findById(hostId);
return PageResponse.of(
Expand Down