nodebb-plugin-calendar-onekite 12.0.7 → 12.0.8
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.
- package/lib/api.js +6 -10
- package/package.json +1 -1
package/lib/api.js
CHANGED
|
@@ -149,10 +149,8 @@ async function canValidate(uid, settings) {
|
|
|
149
149
|
|
|
150
150
|
const allowed = (settings.validatorGroups || '').split(',').map(s => s.trim()).filter(Boolean);
|
|
151
151
|
if (!allowed.length) return false;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
if (isMember) return true;
|
|
155
|
-
}
|
|
152
|
+
if (await userInAnyGroup(uid, allowed)) return true;
|
|
153
|
+
|
|
156
154
|
return false;
|
|
157
155
|
}
|
|
158
156
|
|
|
@@ -166,9 +164,8 @@ async function canCreateSpecial(uid, settings) {
|
|
|
166
164
|
} catch (e) {}
|
|
167
165
|
const allowed = (settings.specialCreatorGroups || '').split(',').map(s => s.trim()).filter(Boolean);
|
|
168
166
|
if (!allowed.length) return false;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
167
|
+
if (await userInAnyGroup(uid, allowed)) return true;
|
|
168
|
+
|
|
172
169
|
return false;
|
|
173
170
|
}
|
|
174
171
|
|
|
@@ -182,9 +179,8 @@ async function canDeleteSpecial(uid, settings) {
|
|
|
182
179
|
} catch (e) {}
|
|
183
180
|
const allowed = (settings.specialDeleterGroups || settings.specialCreatorGroups || '').split(',').map(s => s.trim()).filter(Boolean);
|
|
184
181
|
if (!allowed.length) return false;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
182
|
+
if (await userInAnyGroup(uid, allowed)) return true;
|
|
183
|
+
|
|
188
184
|
return false;
|
|
189
185
|
}
|
|
190
186
|
|
package/package.json
CHANGED