@webiny/api-record-locking 0.0.0-unstable.df7a8bb475 → 0.0.0-unstable.e2758ee1cf
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.
|
@@ -4,7 +4,7 @@ export const hasFullAccessPermission = async identityContext => {
|
|
|
4
4
|
return true;
|
|
5
5
|
}
|
|
6
6
|
const permission = await identityContext.getPermission("recordLocking");
|
|
7
|
-
return permission?.canForceUnlock ===
|
|
7
|
+
return permission?.canForceUnlock === true;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
//# sourceMappingURL=hasFullAccessPermission.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hasFullAccessPermission","identityContext","hasFullAccess","permission","getPermission","canForceUnlock"],"sources":["hasFullAccessPermission.ts"],"sourcesContent":["import type { IdentityContext } from \"@webiny/api-core/features/IdentityContext\";\nimport type { SecurityPermission } from \"@webiny/api-core/types/security.js\";\n\ninterface RecordLockingSecurityPermission extends SecurityPermission {\n canForceUnlock?:
|
|
1
|
+
{"version":3,"names":["hasFullAccessPermission","identityContext","hasFullAccess","permission","getPermission","canForceUnlock"],"sources":["hasFullAccessPermission.ts"],"sourcesContent":["import type { IdentityContext } from \"@webiny/api-core/features/IdentityContext\";\nimport type { SecurityPermission } from \"@webiny/api-core/types/security.js\";\n\ninterface RecordLockingSecurityPermission extends SecurityPermission {\n canForceUnlock?: boolean;\n}\n\nexport const hasFullAccessPermission = async (\n identityContext: IdentityContext.Interface\n): Promise<boolean> => {\n const hasFullAccess = await identityContext.hasFullAccess();\n if (hasFullAccess) {\n return true;\n }\n\n const permission =\n await identityContext.getPermission<RecordLockingSecurityPermission>(\"recordLocking\");\n return permission?.canForceUnlock === true;\n};\n"],"mappings":"AAOA,OAAO,MAAMA,uBAAuB,GAAG,MACnCC,eAA0C,IACvB;EACnB,MAAMC,aAAa,GAAG,MAAMD,eAAe,CAACC,aAAa,CAAC,CAAC;EAC3D,IAAIA,aAAa,EAAE;IACf,OAAO,IAAI;EACf;EAEA,MAAMC,UAAU,GACZ,MAAMF,eAAe,CAACG,aAAa,CAAkC,eAAe,CAAC;EACzF,OAAOD,UAAU,EAAEE,cAAc,KAAK,IAAI;AAC9C,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-record-locking",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.e2758ee1cf",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -13,30 +13,30 @@
|
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@webiny/api": "0.0.0-unstable.
|
|
17
|
-
"@webiny/api-headless-cms": "0.0.0-unstable.
|
|
18
|
-
"@webiny/api-websockets": "0.0.0-unstable.
|
|
19
|
-
"@webiny/feature": "0.0.0-unstable.
|
|
20
|
-
"@webiny/handler": "0.0.0-unstable.
|
|
21
|
-
"@webiny/handler-aws": "0.0.0-unstable.
|
|
22
|
-
"@webiny/handler-graphql": "0.0.0-unstable.
|
|
23
|
-
"@webiny/plugins": "0.0.0-unstable.
|
|
24
|
-
"@webiny/utils": "0.0.0-unstable.
|
|
16
|
+
"@webiny/api": "0.0.0-unstable.e2758ee1cf",
|
|
17
|
+
"@webiny/api-headless-cms": "0.0.0-unstable.e2758ee1cf",
|
|
18
|
+
"@webiny/api-websockets": "0.0.0-unstable.e2758ee1cf",
|
|
19
|
+
"@webiny/feature": "0.0.0-unstable.e2758ee1cf",
|
|
20
|
+
"@webiny/handler": "0.0.0-unstable.e2758ee1cf",
|
|
21
|
+
"@webiny/handler-aws": "0.0.0-unstable.e2758ee1cf",
|
|
22
|
+
"@webiny/handler-graphql": "0.0.0-unstable.e2758ee1cf",
|
|
23
|
+
"@webiny/plugins": "0.0.0-unstable.e2758ee1cf",
|
|
24
|
+
"@webiny/utils": "0.0.0-unstable.e2758ee1cf"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@webiny/api-core": "0.0.0-unstable.
|
|
28
|
-
"@webiny/build-tools": "0.0.0-unstable.
|
|
29
|
-
"@webiny/project-utils": "0.0.0-unstable.
|
|
30
|
-
"@webiny/wcp": "0.0.0-unstable.
|
|
31
|
-
"graphql": "16.
|
|
27
|
+
"@webiny/api-core": "0.0.0-unstable.e2758ee1cf",
|
|
28
|
+
"@webiny/build-tools": "0.0.0-unstable.e2758ee1cf",
|
|
29
|
+
"@webiny/project-utils": "0.0.0-unstable.e2758ee1cf",
|
|
30
|
+
"@webiny/wcp": "0.0.0-unstable.e2758ee1cf",
|
|
31
|
+
"graphql": "16.13.0",
|
|
32
32
|
"rimraf": "6.1.3",
|
|
33
33
|
"type-fest": "5.4.4",
|
|
34
34
|
"typescript": "5.9.3",
|
|
35
|
-
"vitest": "
|
|
35
|
+
"vitest": "4.0.18"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public",
|
|
39
39
|
"directory": "dist"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "e2758ee1cfa3b9a7152e9bb995a90ccabd33266f"
|
|
42
42
|
}
|