mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 01:38:19 +08:00
使用 BigInt 进行权限管理
This commit is contained in:
1 parent
eaed0e84f5
commit
8aef05a375
17 files changed
+252
-197
No files matched your search
+19
-3
@@ -15,6 +15,22 @@ export interface Setting {
|
||||
}
|
||||
|
||||
export interface Udoc extends Dictionary<any> {
|
||||
_id: number,
|
||||
mail: string,
|
||||
mailLower: string,
|
||||
uname: string,
|
||||
unameLower: string,
|
||||
salt: string,
|
||||
hash: string,
|
||||
hashType: string,
|
||||
priv: number,
|
||||
regat: Date,
|
||||
loginat: Date,
|
||||
regip: string,
|
||||
loginip: string,
|
||||
}
|
||||
|
||||
export interface User extends Dictionary<any> {
|
||||
udoc: () => any,
|
||||
dudoc: () => any,
|
||||
_id: number,
|
||||
@@ -26,16 +42,16 @@ export interface Udoc extends Dictionary<any> {
|
||||
priv: number,
|
||||
regat: Date,
|
||||
loginat: Date,
|
||||
perm: string,
|
||||
perm: bigint,
|
||||
role: string,
|
||||
regip: () => string,
|
||||
loginip: () => string,
|
||||
hasPerm: (perm: string) => boolean,
|
||||
hasPerm: (perm: bigint) => boolean,
|
||||
hasPriv: (priv: number) => boolean,
|
||||
checkPassword: (password: string) => void,
|
||||
}
|
||||
|
||||
export type Udict = NumericDictionary<Udoc>;
|
||||
export type Udict = NumericDictionary<User>;
|
||||
|
||||
export interface Pdoc {
|
||||
_id: ObjectID,
|
||||
|
||||
Reference in new issue
Block a user