1 | import { SecurableQueryable, IBasePermissions, PermissionKind } from "./types.js";
|
2 | /**
|
3 | * Gets the effective permissions for the user supplied
|
4 | *
|
5 | * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)
|
6 | */
|
7 | export declare function getUserEffectivePermissions(this: SecurableQueryable, loginName: string): Promise<IBasePermissions>;
|
8 | /**
|
9 | * Gets the effective permissions for the current user
|
10 | */
|
11 | export declare function getCurrentUserEffectivePermissions(this: SecurableQueryable): Promise<IBasePermissions>;
|
12 | /**
|
13 | * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes
|
14 | *
|
15 | * @param copyRoleAssignments If true the permissions are copied from the current parent scope
|
16 | * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object
|
17 | */
|
18 | export declare function breakRoleInheritance(this: SecurableQueryable, copyRoleAssignments?: boolean, clearSubscopes?: boolean): Promise<void>;
|
19 | /**
|
20 | * Removes the local role assignments so that it re-inherit role assignments from the parent object.
|
21 | *
|
22 | */
|
23 | export declare function resetRoleInheritance(this: SecurableQueryable): Promise<void>;
|
24 | /**
|
25 | * Determines if a given user has the appropriate permissions
|
26 | *
|
27 | * @param loginName The user to check
|
28 | * @param permission The permission being checked
|
29 | */
|
30 | export declare function userHasPermissions(this: SecurableQueryable, loginName: string, permission: PermissionKind): Promise<boolean>;
|
31 | /**
|
32 | * Determines if the current user has the requested permissions
|
33 | *
|
34 | * @param permission The permission we wish to check
|
35 | */
|
36 | export declare function currentUserHasPermissions(this: SecurableQueryable, permission: PermissionKind): Promise<boolean>;
|
37 | /**
|
38 | * Taken from sp.js, checks the supplied permissions against the mask
|
39 | *
|
40 | * @param value The security principal's permissions on the given object
|
41 | * @param perm The permission checked against the value
|
42 | */
|
43 | export declare function hasPermissions(value: IBasePermissions, perm: PermissionKind): boolean;
|
44 | //# sourceMappingURL=funcs.d.ts.map |
\ | No newline at end of file |