feat(pay): capability gates for transfer and withdraw

AND feature flags with user_caps balance_transfer / points_transfer /
balance_withdraw on REST and user-center buttons.
This commit is contained in:
2026-07-16 22:35:48 +08:00
parent 9b98080daf
commit c45a0ecef5
4 changed files with 21 additions and 0 deletions
@@ -19,6 +19,7 @@ class AKSRT_Settings_Capabilities {
'user_report' => ['label' => __('举报其它用户', 'aksrt'), 'default' => ['logged' => true]],
'balance_transfer' => ['label' => __('余额转账给其他用户', 'aksrt'), 'exclude_roles' => ['all']],
'points_transfer' => ['label' => __('积分转账给其他用户', 'aksrt'), 'exclude_roles' => ['all']],
'balance_withdraw' => ['label' => __('余额提现', 'aksrt'), 'exclude_roles' => ['all']],
'set_user_ban' => ['label' => __('设置用户封禁状态', 'aksrt'), 'roles' => ['cat_moderator'], 'default' => ['cat_moderator' => true]],
'medal_manually_set' => ['label' => __('为用户授予徽章', 'aksrt'), 'roles' => ['cat_moderator'], 'default' => ['cat_moderator' => true]],