* Leaving feedback to Sysop #20

* Cache sysop info after first user created
* ACS check preventing sysop from sending feedback to themselves @ apply
This commit is contained in:
Bryan Ashby 2015-11-20 17:49:37 -07:00
parent 3dbc90b04f
commit 839ab8fc91
3 changed files with 22 additions and 2 deletions

View File

@ -85,6 +85,8 @@ Message.WellKnownAreaNames = {
Private : 'private_mail'
};
// :TODO: This doesn't seem like a good way to go -- perhaps only for local/user2user, or just use
// a system similar to the "last read" for general areas
Message.Status = {
New : 0,
Read : 1,

View File

@ -132,6 +132,15 @@ function submitApplication(callingMenu, formData, extraArgs) {
} else {
Log.info( { username : formData.value.username, userId : newUser.userId }, 'New user created');
// Cache SysOp information now
// :TODO: Similar to bbs.js. DRY
if(newUser.isSysOp()) {
Config.general.sysOp = {
username : formData.value.username,
properties : newUser.properties,
};
}
if(user.User.AccountStatus.inactive === client.user.properties.account_status) {
callingMenu.gotoMenu(extraArgs.inactive);
} else {

View File

@ -123,7 +123,17 @@
*/
newUserApplication: {
art: NUA
next: newUserFeedbackToSysOpPreamble
next: [
{
// Initial SysOp does not send feedback to themselves
acs: ID1
next: fullLoginSequenceLoginArt
}
{
// ...everyone else does
next: newUserFeedbackToSysOpPreamble
}
]
form: {
0: {
mci: {
@ -309,7 +319,6 @@
next: fullLoginSequenceLoginArt
}
{
// acs: !AS2
next: newUserInactiveDone
}
]