You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To create a user wit username abc that will authenticate using github:
11
11
node createUser.js --username=abc --auth=github
12
12
node createUser.js --username=dp --auth=pam
@@ -15,8 +15,8 @@ Examples of usage:
15
15
16
16
*/
17
17
varsections=[{
18
-
header: 'AGILE IDM User Setup Script',
19
-
content: 'Creates [italic]{users} which are administrators for IDM. This script is meant to be used during bootstrap of AGILE IDM'
18
+
header: 'AGILE IDM User Setup Script (FOR ADMIN USERS MAINLY!!)',
19
+
content: 'Creates [italic]{users} which are administrators for IDM. This script is meant to be used during bootstrap of AGILE IDM [undeline]{Be careful when using this script. It bypasses security checks (to enable the creation of the first user) It is meant to create only admin users. Afterwards admin users can create other users}'
20
20
},{
21
21
header: 'User info',
22
22
optionList: [{
@@ -34,15 +34,22 @@ var sections = [{
34
34
alias: 'p',
35
35
typeLabel: '[underline]{String}',
36
36
description: 'This argument is the password used for the user, and it MUST be passed when auth is "agile-local".'
37
+
},
38
+
{
39
+
name: 'role (optional)',
40
+
alias: 'r',
41
+
typeLabel: '[underline]{String}',
42
+
description: 'This argument specifies the role of the user, by default this is set to admin".'
37
43
}
38
44
45
+
39
46
]
40
47
},{
41
48
header: "Configuration info (optional)",
42
49
optionList: [{
43
50
name: "config",
44
51
alias: "c",
45
-
description: "location of the database. By default '../database_' executed relative to this script's path is used"
52
+
description: "location of the agile-idm-core configuration file. By default it takes the value from the configuration file in ../conf/agile-idm-core-conf.js, which should be '../database_' normally. This path is interpreted as relative to the parent folder"
46
53
}]
47
54
},{
48
55
header: "Help",
@@ -73,35 +80,111 @@ var optionDefinitions = [{
73
80
name: 'help',
74
81
alias: 'h',
75
82
type: String
76
-
},];
83
+
},
84
+
{
85
+
name: 'role',
86
+
alias: 'r',
87
+
type: String
88
+
}];
89
+
90
+
91
+
varpepMockOk={
92
+
declassify: function(userInfo,entityInfo){
93
+
returnnewPromise(function(resolve,reject){
94
+
resolve(entityInfo);
95
+
});
96
+
},
97
+
declassifyArray: function(userInfo,array){
98
+
returnnewPromise(function(resolve,reject){
99
+
resolve(array);
100
+
});
101
+
}
102
+
};
103
+
104
+
varPdpMockOk={
105
+
canRead: function(userInfo,entityInfo){
106
+
returnnewPromise(function(resolve,reject){
107
+
resolve(entityInfo);
108
+
});
109
+
},
110
+
canDelete: function(userInfo,entityInfo){
111
+
returnnewPromise(function(resolve,reject){
112
+
resolve(entityInfo);
113
+
});
114
+
},
115
+
canReadArray: function(userInfo,entities){
116
+
returnnewPromise(function(resolve,reject){
117
+
//console.log('resolving with entities '+JSON.stringify(entities));
0 commit comments