@oktis-works/cms 0.15.0 → 0.15.2
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.
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// by `bun run build`. Used as the offline fallback for `okcms init` ranges
|
|
4
4
|
// when the npm registry cannot be reached.
|
|
5
5
|
export const APP_VERSIONS = {
|
|
6
|
-
'@oktis-works/api': '0.
|
|
7
|
-
'@oktis-works/admin': '0.
|
|
8
|
-
'@oktis-works/web': '0.
|
|
9
|
-
'@oktis-works/worker': '0.8.
|
|
10
|
-
'@oktis-works/core': '0.
|
|
11
|
-
'@oktis-works/plugin-runtime': '0.8.
|
|
12
|
-
'@oktis-works/cms': '0.15.
|
|
6
|
+
'@oktis-works/api': '0.18.0',
|
|
7
|
+
'@oktis-works/admin': '0.26.0',
|
|
8
|
+
'@oktis-works/web': '0.15.0',
|
|
9
|
+
'@oktis-works/worker': '0.8.17',
|
|
10
|
+
'@oktis-works/core': '0.18.0',
|
|
11
|
+
'@oktis-works/plugin-runtime': '0.8.1',
|
|
12
|
+
'@oktis-works/cms': '0.15.2',
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=app-versions.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
-- @okcms domain=core_schema provider=postgres
|
|
2
|
+
-- Adds current_user_id() function for per-user Row Level Security
|
|
3
|
+
-- This enables plugins to create policies like: USING (user_id = current_user_id())
|
|
4
|
+
|
|
5
|
+
-- Function to get current user ID from session setting
|
|
6
|
+
-- Returns NULL if not set (anonymous users)
|
|
7
|
+
CREATE OR REPLACE FUNCTION current_user_id() RETURNS uuid
|
|
8
|
+
LANGUAGE sql STABLE AS $$
|
|
9
|
+
SELECT NULLIF(current_setting('app.current_user_id', true), '')::uuid;
|
|
10
|
+
$$;
|
|
11
|
+
|
|
12
|
+
COMMENT ON FUNCTION current_user_id() IS 'Returns the current user ID from app.current_user_id setting, or NULL for anonymous. Used in RLS policies for per-user data isolation.';
|
|
13
|
+
|
|
14
|
+
-- Note: The setting 'app.current_user_id' is set by the web auth middleware
|
|
15
|
+
-- when a user is authenticated. It should be set via:
|
|
16
|
+
-- SELECT set_config('app.current_user_id', $userId, false);
|
|
17
|
+
-- And cleared with:
|
|
18
|
+
-- RESET app.current_user_id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oktis-works/cms",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"wp:validate": "node --loader ts-node/esm src/wp-migrate/index.ts validate"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@oktis-works/auth": "^0.
|
|
26
|
-
"@oktis-works/config": "^0.
|
|
27
|
-
"@oktis-works/core": "^0.
|
|
28
|
-
"@oktis-works/database": "^0.
|
|
25
|
+
"@oktis-works/auth": "^0.9.0",
|
|
26
|
+
"@oktis-works/config": "^0.7.0",
|
|
27
|
+
"@oktis-works/core": "^0.18.0",
|
|
28
|
+
"@oktis-works/database": "^0.16.1",
|
|
29
29
|
"@oktis-works/theme-runtime": "^0.12.0",
|
|
30
30
|
"@oktis-works/validation": "^0.8.2",
|
|
31
31
|
"mysql2": "^3.14.1"
|