fix: harden permission-gated UI — minimum-org endpoint, modal/Popconfirm fail-closed on revocation
Some checks failed
CI / check (pull_request) Failing after 3m46s
Some checks failed
CI / check (pull_request) Failing after 3m46s
This commit is contained in:
@@ -313,10 +313,8 @@ interface MatchModalProps {
|
||||
|
||||
const JinshujuMatchModal: React.FC<MatchModalProps> = ({ open, onClose, onApplied }) => {
|
||||
const { hasPermission, hasAllPermissions, permissionsReady } = usePermission();
|
||||
const canReadSync = hasPermission('sync:read');
|
||||
const canTriggerSync = hasPermission('sync:trigger');
|
||||
const canEnterModal = permissionsReady && hasAllPermissions('sync:read', 'sync:trigger');
|
||||
const canWriteRules = permissionsReady && canTriggerSync;
|
||||
const [step, setStep] = useState<'connection' | 'rule' | 'match' | 'applying'>('connection');
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [selectedRuleId, setSelectedRuleId] = useState<number | undefined>();
|
||||
|
||||
Reference in New Issue
Block a user