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

관리자가 사용자 닉네임을 클릭하면 나오는 팝업 메뉴에 사용자 알림설정 메뉴가 표시 안되는 경우 #2148

Closed
Erictoby opened this issue Jul 10, 2023 · 1 comment
Labels
cleanup 정리

Comments

@Erictoby
Copy link
Contributor

알림센터 Lite 모듈 / 기본설정 / 회원 메뉴 표시 = 표시하지 않음, 회원 알림 설정 = 사용, 으로 설정하는 경우에, 관리자가 사용자 닉네임을 클릭했을 때 나오는 팝업 메뉴에 "사용자 알림설정" 메뉴가 표시 안됩니다.

원인을 찾아보니, ncenterlite.controller.php에서

if($config->user_config_list == 'Y')
{
$logged_info = Context::get('logged_info');
if(!Context::get('is_logged'))
{
return;
}
$target_srl = Context::get('target_srl');

if문 안에서 $logged_info와 $target_srl 가 할당되다 보니까, $config->user_config_list = 'N' (회원 메뉴 표시 = 표시하지 않음) 인 조건일 경우에는 $logged_info와 $target_srl이 선언이 안되게 됩니다. 그런데, 그 아래의 '회원 알림 설정'에서

if($config->user_notify_setting == 'Y')
{
$oMemberController->addMemberMenu('dispNcenterliteUserConfig', 'ncenterlite_my_settings');
if($logged_info->is_admin == 'Y')
{
$url = getUrl('', 'act', 'dispNcenterliteUserConfig', 'member_srl', $target_srl);

이 두 변수를 참조하다보니까, $config->user_config_list = 'N' $config->user_notify_setting = 'Y'로 설정해 놓으면 이 두 변수가 선언되지 않은 상태가되어 if($logged_info->is_admin == 'Y') 부분은 실행이 안되게 되어 있네요.

해결: 두 변수 선언을 if 문 밖으로 빼던지, 아래쪽 if 문 안에도 동일하게 넣던지 하면 팝업 메뉴에 "사용자 알림설정" 메뉴가 정상적으로 표시되었습니다.

@kijin
Copy link
Member

kijin commented Jul 12, 2023

#1925

  • 관리자라고 해도 다른 회원의 알림 설정 화면에 접근할 수 있는 것은 설계 미스로 보입니다. 이 기능에 더 쉽게 접근할 수 있도록 수정하기보다는, 아예 접근을 허용하지 않는 방향으로 수정하겠습니다.
  • 그 밖에 코드 정리가 필요한 부분은 정리하겠습니다.

@kijin kijin added the cleanup 정리 label Jul 12, 2023
@kijin kijin closed this as completed in fcf2ad8 Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup 정리
Projects
None yet
Development

No branches or pull requests

2 participants