nodebb-plugin-pdf-secure 1.2.26 → 1.2.27

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/library.js CHANGED
@@ -41,11 +41,12 @@ plugin.init = async (params) => {
41
41
  if (req.params.filename && req.params.filename.toLowerCase().endsWith('.pdf')) {
42
42
  // Admin ve Global Mod'lar direkt erişebilsin
43
43
  if (req.uid) {
44
- const [isAdmin, isGlobalMod] = await Promise.all([
44
+ const [isAdmin, isGlobalMod, isVip] = await Promise.all([
45
45
  groups.isMember(req.uid, 'administrators'),
46
46
  groups.isMember(req.uid, 'Global Moderators'),
47
+ groups.isMember(req.uid, 'VIP'),
47
48
  ]);
48
- if (isAdmin || isGlobalMod) {
49
+ if (isAdmin || isGlobalMod || isVip) {
49
50
  return next();
50
51
  }
51
52
  }
@@ -82,13 +83,14 @@ plugin.init = async (params) => {
82
83
  let isPremium = false;
83
84
  let isLite = false;
84
85
  if (req.uid) {
85
- const [isAdmin, isGlobalMod, isPremiumMember, isLiteMember] = await Promise.all([
86
+ const [isAdmin, isGlobalMod, isPremiumMember, isVipMember, isLiteMember] = await Promise.all([
86
87
  groups.isMember(req.uid, 'administrators'),
87
88
  groups.isMember(req.uid, 'Global Moderators'),
88
89
  groups.isMember(req.uid, 'Premium'),
90
+ groups.isMember(req.uid, 'VIP'),
89
91
  groups.isMember(req.uid, 'Lite'),
90
92
  ]);
91
- isPremium = isAdmin || isGlobalMod || isPremiumMember;
93
+ isPremium = isAdmin || isGlobalMod || isPremiumMember || isVipMember;
92
94
  // Lite: full PDF access but restricted UI (no annotations, sidebar, etc.)
93
95
  isLite = !isPremium && isLiteMember;
94
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-pdf-secure",
3
- "version": "1.2.26",
3
+ "version": "1.2.27",
4
4
  "description": "Secure PDF viewer plugin for NodeBB - prevents downloading, enables canvas-only rendering with Premium group support",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -17,6 +17,12 @@
17
17
  <div class="form-text">Users in this group can view full PDFs with all tools. Others can only see the first page.</div>
18
18
  </div>
19
19
 
20
+ <div class="mb-3">
21
+ <label class="form-label" for="vipGroup">VIP Group Name</label>
22
+ <input type="text" id="vipGroup" name="vipGroup" title="VIP Group Name" class="form-control" placeholder="VIP" value="VIP">
23
+ <div class="form-text">Users in this group get all Premium features plus VIP badge and early access to new features.</div>
24
+ </div>
25
+
20
26
  <div class="mb-3">
21
27
  <label class="form-label" for="liteGroup">Lite Group Name</label>
22
28
  <input type="text" id="liteGroup" name="liteGroup" title="Lite Group Name" class="form-control" placeholder="Lite" value="Lite">