前端权限控制方案 (IAM)

Official

基于 IAM 的前端权限控件与无权限交互规范

AuthorTencentBlueKing
Version1.0.0
Installs0

System Documentation

What problem does it solve?

在蓝鲸体系中,权限控制不仅是“显示/隐藏”,更重要的是实现“发现与申请”。本方案提供可复用的前端鉴权方案,通过 v-authority 指令、AuthButton 组件以及路由级鉴权实现对 UI 与导航的权限控制,确保无权限时的降级提示和合规流程。

Core Features & Use Cases

  • v-authority 指令实现点击拦截、样式置灰与申请弹窗的唤起,自动处理权限受限的交互。
  • AuthButton 组件封装,适用于需要自定义按钮权限行为的场景。
  • 路由级鉴权在 vue-router beforeEach 中执行,用于页面级权限保护与跳转控制。
  • 使用场景包括企业后台、需要细粒度前端权限的应用,以及对发现与申请流程有强需求的场景。

Quick Start

将 authority-directive.ts 加载到应用中,并在需要权限控制的按钮上应用 v-authority 指令以实现鉴权。

Dependency Matrix

Required Modules

None required

Components

assets

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: 前端权限控制方案 (IAM)
Download link: https://github.com/TencentBlueKing/bk-bcs/archive/main.zip#iam

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.