Add permission checks to account and QNA pages

- Add grant check (46, 'X') to password change navigation handlers
- Add grant check (45, 'X') to user management save/add operations
- Add grant check (64, 'X') to QNA registration
- Refactor inline onClick handlers to separate methods for better maintainability
- Add debug logging to checkGrant function

Changes:
- password-manage-wrap: Extract changeLoginPassword and changeCancelPassword methods
- user-account-auth-wrap: Extract handleSave method with permission check
- user-login-auth-info-wrap: Add permission check to handleSave
- user-manage-wrap: Add permission check to onClickToNavigation, simplify onClick
- qna/register-page: Add permission check to onClickToRegisterQna

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jay Sheen
2025-11-05 17:36:34 +09:00
parent 5c0650afe5
commit 7160109f78
4 changed files with 48 additions and 13 deletions

View File

@@ -3,6 +3,9 @@ import { useStore } from "../model/store";
export const checkGrant = (menuId?: number, authType: string = 'R') => {
const menuGrantsByKey = useStore.getState().UserStore.menuGrantsByKey;
const myGrants = menuGrantsByKey['' + menuId];
console.log('checkGrant', menuId, authType, myGrants);
if(myGrants?.includes(authType) || menuId === -1){
return true
}