mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core: restore PERM_EDIT_PROBLEM_SELF
This commit is contained in:
1 parent
5b0478fb3f
commit
866aa56f78
11 files changed
+25
-21
No files matched your search
@@ -72,6 +72,8 @@ export interface Udoc extends Dictionary<any> {
|
||||
loginip: string,
|
||||
}
|
||||
|
||||
export type ownerInfo = { owner: number, maintainer?: number[] };
|
||||
|
||||
export interface User extends Record<string, any> {
|
||||
_id: number,
|
||||
_udoc: Udoc,
|
||||
@@ -90,6 +92,9 @@ export interface User extends Record<string, any> {
|
||||
perm: bigint,
|
||||
scope: bigint,
|
||||
role: string,
|
||||
own<T extends ownerInfo>(doc: T, checkPerm: bigint): boolean
|
||||
own<T extends ownerInfo>(doc: T, exact: boolean): boolean
|
||||
own<T extends ownerInfo>(doc: T): boolean
|
||||
own<T extends { owner: number, maintainer?: number[] }>(doc: T): boolean;
|
||||
hasPerm: (...perm: bigint[]) => boolean,
|
||||
hasPriv: (...priv: number[]) => boolean,
|
||||
|
||||
Reference in new issue
Block a user