backend-manager 2.5.9 → 2.5.11
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/package.json
CHANGED
|
@@ -93,7 +93,7 @@ Module.prototype.main = function () {
|
|
|
93
93
|
}
|
|
94
94
|
newUrl.searchParams.set('state', JSON.stringify(state));
|
|
95
95
|
newUrl.searchParams.set('client_id', client_id);
|
|
96
|
-
newUrl.searchParams.set('scope', arrayify(payload.data.payload.scope)
|
|
96
|
+
newUrl.searchParams.set('scope', arrayify(payload.data.payload.scope).join(' '));
|
|
97
97
|
newUrl.searchParams.set('redirect_uri', self.ultimateJekyllOAuth2Url);
|
|
98
98
|
|
|
99
99
|
newUrl.searchParams.set('access_type', typeof payload.data.payload.access_type === 'undefined' ? 'offline' : payload.data.payload.access_type)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function Roles(Manager) {
|
|
2
|
+
const self = this;
|
|
3
|
+
|
|
4
|
+
self.Manager = Manager;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
Roles.prototype.list = function () {
|
|
8
|
+
const self = this;
|
|
9
|
+
|
|
10
|
+
return [
|
|
11
|
+
// Staff
|
|
12
|
+
{
|
|
13
|
+
id: 'staff',
|
|
14
|
+
name: 'Staff',
|
|
15
|
+
regex: /(^staff$)/ig,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 'admin',
|
|
19
|
+
name: 'Administrator',
|
|
20
|
+
regex: /(^administrator$|^admin$)/ig,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'moderator',
|
|
24
|
+
name: 'Moderator',
|
|
25
|
+
regex: /(^moderator$|^mod$)/ig,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'moderatorJr',
|
|
29
|
+
name: 'Jr. Moderator',
|
|
30
|
+
regex: /(^moderatorjr$|^modjr$)/ig,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'blogger',
|
|
34
|
+
name: 'Blogger',
|
|
35
|
+
regex: /(^blogger$|^blog$)/ig,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'developer',
|
|
39
|
+
name: 'Developer',
|
|
40
|
+
regex: /(^developer$|^dev$)/ig,
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
// Features
|
|
44
|
+
{
|
|
45
|
+
id: 'betaTester',
|
|
46
|
+
name: 'Beta Tester',
|
|
47
|
+
regex: /(^betatester$|^beta$)/ig,
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
// Vanity
|
|
51
|
+
{
|
|
52
|
+
id: 'og',
|
|
53
|
+
name: 'OG',
|
|
54
|
+
regex: /(^og$)/ig,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'vip',
|
|
58
|
+
name: 'VIP',
|
|
59
|
+
regex: /(^vip)/ig,
|
|
60
|
+
},
|
|
61
|
+
]
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
module.exports = Roles;
|
package/src/manager/index.js
CHANGED
|
@@ -562,6 +562,12 @@ Manager.prototype.Utilities = function () {
|
|
|
562
562
|
return new self.libraries.Utilities(self, ...arguments);
|
|
563
563
|
};
|
|
564
564
|
|
|
565
|
+
Manager.prototype.Roles = function () {
|
|
566
|
+
const self = this;
|
|
567
|
+
self.libraries.Roles = self.libraries.Roles || require('./helpers/roles.js');
|
|
568
|
+
return new self.libraries.Roles(self, ...arguments);
|
|
569
|
+
};
|
|
570
|
+
|
|
565
571
|
Manager.prototype.storage = function (options) {
|
|
566
572
|
const self = this;
|
|
567
573
|
options = options || {};
|