1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/outline_ynh.git synced 2024-09-03 19:56:12 +02:00

Test update visitor patch

This commit is contained in:
Limezy 2024-05-09 17:17:43 +07:00
parent d33e56bb74
commit f95a1a5268
2 changed files with 12 additions and 17 deletions

View file

@ -155,26 +155,19 @@ index 872709a30..52ef90de6 100644
"prosemirror-dropcursor": "^1.8.1",
diff --git a/plugins/req/plugin.json b/plugins/req/plugin.json
new file mode 100644
index 000000000..ae7c40333
index 000000000..bf4c23043
--- /dev/null
+++ b/plugins/req/plugin.json
@@ -0,0 +1,4 @@
@@ -0,0 +1,6 @@
+{
+ "id": "visiteur",
+ "name": "visiteur",
+ "priority": 30,
+ "description": "Adds an req compatible authentication provider."
+}
diff --git a/plugins/req/server/.babelrc b/plugins/req/server/.babelrc
new file mode 100644
index 000000000..c87001bc4
--- /dev/null
+++ b/plugins/req/server/.babelrc
@@ -0,0 +1,3 @@
+{
+ "extends": "../../../server/.babelrc"
+}
diff --git a/plugins/req/server/auth/req.ts b/plugins/req/server/auth/req.ts
new file mode 100644
index 000000000..bc03fc6d3
index 000000000..6fca14d54
--- /dev/null
+++ b/plugins/req/server/auth/req.ts
@@ -0,0 +1,70 @@
@ -185,7 +178,6 @@ index 000000000..bc03fc6d3
+import { Strategy as ReqStrategy } from "passport-req";
+import { slugifyDomain } from "@shared/utils/domains";
+import accountProvisioner from "@server/commands/accountProvisioner";
+import env from "@server/env";
+import passportMiddleware from "@server/middlewares/passport";
+import { User } from "@server/models";
+import { AuthenticationResult } from "@server/types";
@ -194,6 +186,7 @@ index 000000000..bc03fc6d3
+ getTeamFromContext,
+ getClientFromContext,
+} from "@server/utils/passport";
+import env from "@server/env";
+
+const router = new Router();
+const providerName = "req";

View file

@ -12,17 +12,19 @@ index e0d3f56ea..fcd1ce270 100644
"prosemirror-commands": "^1.5.2",
diff --git a/plugins/req/plugin.json b/plugins/req/plugin.json
new file mode 100644
index 000000000..ae7c40333
index 000000000..bf4c23043
--- /dev/null
+++ b/plugins/req/plugin.json
@@ -0,0 +1,4 @@
@@ -0,0 +1,6 @@
+{
+ "id": "visiteur",
+ "name": "visiteur",
+ "priority": 30,
+ "description": "Adds an req compatible authentication provider."
+}
diff --git a/plugins/req/server/auth/req.ts b/plugins/req/server/auth/req.ts
new file mode 100644
index 000000000..bc03fc6d3
index 000000000..6fca14d54
--- /dev/null
+++ b/plugins/req/server/auth/req.ts
@@ -0,0 +1,70 @@
@ -33,7 +35,6 @@ index 000000000..bc03fc6d3
+import { Strategy as ReqStrategy } from "passport-req";
+import { slugifyDomain } from "@shared/utils/domains";
+import accountProvisioner from "@server/commands/accountProvisioner";
+import env from "@server/env";
+import passportMiddleware from "@server/middlewares/passport";
+import { User } from "@server/models";
+import { AuthenticationResult } from "@server/types";
@ -42,6 +43,7 @@ index 000000000..bc03fc6d3
+ getTeamFromContext,
+ getClientFromContext,
+} from "@server/utils/passport";
+import env from "@server/env";
+
+const router = new Router();
+const providerName = "req";