Skip to content

Commit ad8e931

Browse files
committed
actually use default level!
1 parent 2d7caa5 commit ad8e931

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/model/user.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
*/
1717
var mongoose = require('mongoose');
1818
var timestamps = require('mongoose-timestamp');
19+
const config = require('../../config/config');
1920

2021
var User = new mongoose.Schema({
2122
orcid: String,
2223
name: { type: String, default: '' },
23-
level: { type: Number, default: 0 },
24+
level: { type: Number, default: config.user.level.default },
2425
lastseenAt: { type: Date, default: Date.now }
2526
});
2627
User.plugin(timestamps);

lib/slack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ exports.newOrcidUser = function (orcid) {
9999
{
100100
title: 'New user registration: ' + orcid,
101101
title_link: user_link, // important "data", do not remove
102-
text: "What user level should the new user get?",
102+
text: "What user level should the new user get? She now has " + config.user.level.default,
103103
fallback: "0",
104104
callback_id: "user_level",
105105
color: "#004286",
@@ -110,7 +110,7 @@ exports.newOrcidUser = function (orcid) {
110110
actions: [
111111
{
112112
"name": "user_level",
113-
"text": "Stay new user",
113+
"text": "New user",
114114
"type": "button",
115115
"value": "0"
116116
},

0 commit comments

Comments
 (0)