labull-framework 1.4.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/auth.js +1 -1
- package/dist/{chunk-index-3dQJWK2S.js → chunk-index-Bf5t2QKZ.js} +1 -1
- package/dist/{chunk-index-BVIJeFeJ.js → chunk-index-CXSN4mHl.js} +20 -20
- package/dist/index.js +2 -2
- package/dist/magic-block.js +10 -10
- package/dist/style.css +1 -1
- package/dist/types/auth-real.d.ts +3 -3
- package/dist/ui.js +1 -1
- package/package.json +1 -1
|
@@ -16,8 +16,8 @@ export interface AuthUser {
|
|
|
16
16
|
name: string;
|
|
17
17
|
/** 工号(Authing 的 `username` 同步过来的;没有就是 null)。 */
|
|
18
18
|
workId: string | null;
|
|
19
|
-
/** 🔴 "是不是管理员" =
|
|
20
|
-
|
|
19
|
+
/** 🔴 "是不是管理员" = 在**管理员角色**(项目角色表里 `is_admin` 那一行)的组里。前端只拿它做**显隐**,授权全在后端。 */
|
|
20
|
+
isAdmin: boolean;
|
|
21
21
|
groups: string[];
|
|
22
22
|
permissions: string[];
|
|
23
23
|
}
|
|
@@ -55,7 +55,7 @@ export interface AuthGateOptions {
|
|
|
55
55
|
export declare function createAuthGate(options?: AuthGateOptions): AuthGate;
|
|
56
56
|
export declare function useAuth(): {
|
|
57
57
|
user: Ref<AuthUser | null, AuthUser | null>;
|
|
58
|
-
|
|
58
|
+
isAdmin: import("vue").ComputedRef<boolean>;
|
|
59
59
|
/** 🔴 只是界面提示位(本地读得到 CSRF cookie 就算),**不是授权判据**:要挡就在后端挡。 */
|
|
60
60
|
isAuthenticated: () => boolean;
|
|
61
61
|
refresh: () => Promise<AuthUser | null>;
|
package/dist/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, P as o, a as t, b as l, _ as T, U as b, i as r, l as i } from "./chunk-index-
|
|
1
|
+
import { A as e, P as o, a as t, b as l, _ as T, U as b, i as r, l as i } from "./chunk-index-Bf5t2QKZ.js";
|
|
2
2
|
import { T as n, a as p, c as u, f as d, i as P, b as f, o as x, p as A, s as v, u as C, d as S } from "./chunk-ProductShell.vue_vue_type_style_index_0_scoped_06035587_lang-Fky1ghd2.js";
|
|
3
3
|
export {
|
|
4
4
|
e as AppSearch,
|