- Added a trigger for when a user is created or updated by an admin.

This commit is contained in:
JT Smith 2007-07-29 20:00:02 +00:00
parent 66e4b82f8a
commit e07b63476c
4 changed files with 123 additions and 54 deletions

View file

@ -18,8 +18,9 @@
- Color coded most buttons, green for proceed and red for go back. - Color coded most buttons, green for proceed and red for go back.
- Encrypt page now forces SSL and can check for the SSLPROXY pass through - Encrypt page now forces SSL and can check for the SSLPROXY pass through
variable in addition to the HTTPS variable. variable in addition to the HTTPS variable.
- Encrypt page no longer shows up unless SSL mode is enabled in the config - Added sslEnabled directive to the config file, which disables SSL related
file. features unless this directive is set.
- Added a trigger for when a user is created or updated by an admin.
- fix: A bug where it was possible to delete a system page if it were made - fix: A bug where it was possible to delete a system page if it were made
the child of a non-system page that you had edit rights to. the child of a non-system page that you had edit rights to.
- api: Added a unified contraints system for the file and image assets. - api: Added a unified contraints system for the file and image assets.

View file

@ -43,6 +43,7 @@ sub definition {
my $session = shift; my $session = shift;
my $i18n = shift; my $i18n = shift;
my @fields = (); my @fields = ();
my $setting = $session->setting;
# company info # company info
push(@fields, { push(@fields, {
tab=>"company", tab=>"company",
@ -50,7 +51,7 @@ sub definition {
name=>"companyName", name=>"companyName",
label=>$i18n->get(125), label=>$i18n->get(125),
hoverHelp=>$i18n->get('125 description'), hoverHelp=>$i18n->get('125 description'),
defaultValue=>$session->setting->get("companyName") defaultValue=>$setting->get("companyName")
}); });
push(@fields, { push(@fields, {
tab=>"company", tab=>"company",
@ -58,7 +59,7 @@ sub definition {
name=>"companyEmail", name=>"companyEmail",
label=>$i18n->get(126), label=>$i18n->get(126),
hoverHelp=>$i18n->get('126 description'), hoverHelp=>$i18n->get('126 description'),
defaultValue=>$session->setting->get("companyEmail") defaultValue=>$setting->get("companyEmail")
}); });
push(@fields, { push(@fields, {
tab=>"company", tab=>"company",
@ -66,7 +67,7 @@ sub definition {
name=>"companyURL", name=>"companyURL",
label=>$i18n->get(127), label=>$i18n->get(127),
hoverHelp=>$i18n->get('127 description'), hoverHelp=>$i18n->get('127 description'),
defaultValue=>$session->setting->get("companyURL") defaultValue=>$setting->get("companyURL")
}); });
# content settings # content settings
@ -74,7 +75,7 @@ sub definition {
tab=>"content", tab=>"content",
fieldType=>"workflow", fieldType=>"workflow",
name=>"defaultVersionTagWorkflow", name=>"defaultVersionTagWorkflow",
defaultValue=>$session->setting->get("defaultVersionTagWorkflow"), defaultValue=>$setting->get("defaultVersionTagWorkflow"),
type=>"WebGUI::VersionTag", type=>"WebGUI::VersionTag",
label=>$i18n->get("default version tag workflow"), label=>$i18n->get("default version tag workflow"),
hoverHelp=>$i18n->get('default version tag workflow help'), hoverHelp=>$i18n->get('default version tag workflow help'),
@ -86,7 +87,7 @@ sub definition {
name=>"autoRequestCommit", name=>"autoRequestCommit",
label=>$i18n->get("auto request commit"), label=>$i18n->get("auto request commit"),
hoverHelp=>$i18n->get("auto request commit help"), hoverHelp=>$i18n->get("auto request commit help"),
defaultValue=>$session->setting->get("autoRequestCommit") defaultValue=>$setting->get("autoRequestCommit")
}); });
push(@fields, { push(@fields, {
tab=>"content", tab=>"content",
@ -94,13 +95,13 @@ sub definition {
name=>"skipCommitComments", name=>"skipCommitComments",
label=>$i18n->get("skip commit comments"), label=>$i18n->get("skip commit comments"),
hoverHelp=>$i18n->get("skip commit comments"), hoverHelp=>$i18n->get("skip commit comments"),
defaultValue=>$session->setting->get("skipCommitComments") defaultValue=>$setting->get("skipCommitComments")
}); });
push(@fields, { push(@fields, {
tab=>"content", tab=>"content",
fieldType=>"workflow", fieldType=>"workflow",
name=>"trashWorkflow", name=>"trashWorkflow",
defaultValue=>$session->setting->get("trashWorkflow"), defaultValue=>$setting->get("trashWorkflow"),
type=>"None", type=>"None",
label=>$i18n->get("trash workflow"), label=>$i18n->get("trash workflow"),
hoverHelp=>$i18n->get('trash workflow help') hoverHelp=>$i18n->get('trash workflow help')
@ -109,7 +110,7 @@ sub definition {
tab=>"content", tab=>"content",
fieldType=>"workflow", fieldType=>"workflow",
name=>"purgeWorkflow", name=>"purgeWorkflow",
defaultValue=>$session->setting->get("purgeWorkflow"), defaultValue=>$setting->get("purgeWorkflow"),
type=>"None", type=>"None",
label=>$i18n->get("purge workflow"), label=>$i18n->get("purge workflow"),
hoverHelp=>$i18n->get('purge workflow help') hoverHelp=>$i18n->get('purge workflow help')
@ -118,7 +119,7 @@ sub definition {
tab=>"content", tab=>"content",
fieldType=>"workflow", fieldType=>"workflow",
name=>"changeUrlWorkflow", name=>"changeUrlWorkflow",
defaultValue=>$session->setting->get("changeUrlWorkflow"), defaultValue=>$setting->get("changeUrlWorkflow"),
type=>"None", type=>"None",
label=>$i18n->get("changeUrl workflow"), label=>$i18n->get("changeUrl workflow"),
hoverHelp=>$i18n->get('changeUrl workflow help') hoverHelp=>$i18n->get('changeUrl workflow help')
@ -136,7 +137,7 @@ sub definition {
name=>"defaultPage", name=>"defaultPage",
label=>$i18n->get(527), label=>$i18n->get(527),
hoverHelp=>$i18n->get('527 description'), hoverHelp=>$i18n->get('527 description'),
defaultValue=>$session->setting->get("defaultPage") defaultValue=>$setting->get("defaultPage")
}); });
push(@fields, { push(@fields, {
tab=>"content", tab=>"content",
@ -144,13 +145,13 @@ sub definition {
name=>"notFoundPage", name=>"notFoundPage",
label=>$i18n->get(141), label=>$i18n->get(141),
hoverHelp=>$i18n->get('141 description'), hoverHelp=>$i18n->get('141 description'),
defaultValue=>$session->setting->get("notFoundPage") defaultValue=>$setting->get("notFoundPage")
}); });
push(@fields, { push(@fields, {
tab=>"content", tab=>"content",
fieldType=>"text", fieldType=>"text",
name=>"urlExtension", name=>"urlExtension",
defaultValue=>$session->setting->get("urlExtension"), defaultValue=>$setting->get("urlExtension"),
label=>$i18n->get("url extension"), label=>$i18n->get("url extension"),
hoverHelp=>$i18n->get("url extension description"), hoverHelp=>$i18n->get("url extension description"),
}); });
@ -160,7 +161,7 @@ sub definition {
name=>"maxAttachmentSize", name=>"maxAttachmentSize",
label=>$i18n->get(130), label=>$i18n->get(130),
hoverHelp=>$i18n->get('130 description'), hoverHelp=>$i18n->get('130 description'),
defaultValue=>$session->setting->get("maxAttachmentSize") defaultValue=>$setting->get("maxAttachmentSize")
}); });
push(@fields, { push(@fields, {
tab=>"content", tab=>"content",
@ -168,7 +169,7 @@ sub definition {
name=>"maxImageSize", name=>"maxImageSize",
label=>$i18n->get(583), label=>$i18n->get(583),
hoverHelp=>$i18n->get('583 description'), hoverHelp=>$i18n->get('583 description'),
defaultValue=>$session->setting->get("maxImageSize") defaultValue=>$setting->get("maxImageSize")
}); });
push(@fields, { push(@fields, {
tab=>"content", tab=>"content",
@ -176,7 +177,7 @@ sub definition {
name=>"thumbnailSize", name=>"thumbnailSize",
label=>$i18n->get(406), label=>$i18n->get(406),
hoverHelp=>$i18n->get('406 description'), hoverHelp=>$i18n->get('406 description'),
defaultValue=>$session->setting->get("thumbnailSize") defaultValue=>$setting->get("thumbnailSize")
}); });
push(@fields, { push(@fields, {
tab=>"content", tab=>"content",
@ -184,7 +185,7 @@ sub definition {
name=>"metaDataEnabled", name=>"metaDataEnabled",
label=>$i18n->get("Enable Metadata"), label=>$i18n->get("Enable Metadata"),
hoverHelp=>$i18n->get("Enable Metadata description"), hoverHelp=>$i18n->get("Enable Metadata description"),
defaultValue=>$session->setting->get("metaDataEnabled") defaultValue=>$setting->get("metaDataEnabled")
}); });
# user interface settings # user interface settings
push(@fields, { push(@fields, {
@ -193,7 +194,7 @@ sub definition {
name=>"richEditor", name=>"richEditor",
label=>$i18n->get("default rich editor"), label=>$i18n->get("default rich editor"),
hoverHelp=>$i18n->get("default rich editor description"), hoverHelp=>$i18n->get("default rich editor description"),
defaultValue=>[$session->setting->get("richEditor") || "PBrichedit000000000001"], defaultValue=>[$setting->get("richEditor") || "PBrichedit000000000001"],
options=>WebGUI::Asset::RichEdit->getList($session) options=>WebGUI::Asset::RichEdit->getList($session)
}); });
push(@fields, { push(@fields, {
@ -202,7 +203,7 @@ sub definition {
name=>"textBoxSize", name=>"textBoxSize",
label=>$i18n->get(465), label=>$i18n->get(465),
hoverHelp=>$i18n->get('465 description'), hoverHelp=>$i18n->get('465 description'),
defaultValue=>$session->setting->get("textBoxSize") defaultValue=>$setting->get("textBoxSize")
}); });
push(@fields, { push(@fields, {
tab=>"ui", tab=>"ui",
@ -211,7 +212,7 @@ sub definition {
label=>$i18n->get('user function style'), label=>$i18n->get('user function style'),
hoverHelp=>$i18n->get('user function style description'), hoverHelp=>$i18n->get('user function style description'),
namespace=>"style", namespace=>"style",
defaultValue=>$session->setting->get("userFunctionStyleId") defaultValue=>$setting->get("userFunctionStyleId")
}); });
push(@fields, { push(@fields, {
tab=>"ui", tab=>"ui",
@ -220,43 +221,43 @@ sub definition {
label=>$i18n->get('admin console template'), label=>$i18n->get('admin console template'),
hoverHelp=>$i18n->get('admin console template description'), hoverHelp=>$i18n->get('admin console template description'),
namespace=>"AdminConsole", namespace=>"AdminConsole",
defaultValue=>$session->setting->get("AdminConsoleTemplate") defaultValue=>$setting->get("AdminConsoleTemplate")
}); });
# messaging settings
push(@fields, { push(@fields, {
tab=>"ui", tab=>"messaging",
fieldType=>"template", fieldType=>"template",
name=>"viewInboxTemplateId", name=>"viewInboxTemplateId",
label=>$i18n->get('view inbox template'), label=>$i18n->get('view inbox template'),
hoverHelp=>$i18n->get('view inbox template description'), hoverHelp=>$i18n->get('view inbox template description'),
namespace=>"Inbox", namespace=>"Inbox",
defaultValue=>$session->setting->get("viewInboxTemplateId"), defaultValue=>$setting->get("viewInboxTemplateId"),
}); });
push(@fields, { push(@fields, {
tab=>"ui", tab=>"messaging",
fieldType=>"template", fieldType=>"template",
name=>"viewInboxMessageTemplateId", name=>"viewInboxMessageTemplateId",
label=>$i18n->get('view inbox message template'), label=>$i18n->get('view inbox message template'),
hoverHelp=>$i18n->get('view inbox message template description'), hoverHelp=>$i18n->get('view inbox message template description'),
namespace=>"Inbox/Message", namespace=>"Inbox/Message",
defaultValue=>$session->setting->get("viewInboxMessageTemplateId"), defaultValue=>$setting->get("viewInboxMessageTemplateId"),
}); });
push(@fields, { push(@fields, {
tab=>"ui", tab=>"messaging",
fieldType=>"template", fieldType=>"template",
name=>"sendPrivateMessageTemplateId", name=>"sendPrivateMessageTemplateId",
label=>$i18n->get('send private message template'), label=>$i18n->get('send private message template'),
hoverHelp=>$i18n->get('send private message template description'), hoverHelp=>$i18n->get('send private message template description'),
namespace=>"Inbox/SendPrivateMessage", namespace=>"Inbox/SendPrivateMessage",
defaultValue=>$session->setting->get("sendPrivateMessageTemplateId"), defaultValue=>$setting->get("sendPrivateMessageTemplateId"),
}); });
# messaging settings
push(@fields, { push(@fields, {
tab=>"messaging", tab=>"messaging",
fieldType=>"text", fieldType=>"text",
name=>"smtpServer", name=>"smtpServer",
label=>$i18n->get(135), label=>$i18n->get(135),
hoverHelp=>$i18n->get('135 description'), hoverHelp=>$i18n->get('135 description'),
defaultValue=>$session->setting->get("smtpServer") defaultValue=>$setting->get("smtpServer")
}); });
push(@fields, { push(@fields, {
tab=>"messaging", tab=>"messaging",
@ -264,7 +265,7 @@ sub definition {
name=>"mailFooter", name=>"mailFooter",
label=>$i18n->get(824), label=>$i18n->get(824),
hoverHelp=>$i18n->get('824 description'), hoverHelp=>$i18n->get('824 description'),
defaultValue=>$session->setting->get("mailFooter") defaultValue=>$setting->get("mailFooter")
}); });
push(@fields, { push(@fields, {
tab=>"messaging", tab=>"messaging",
@ -272,7 +273,7 @@ sub definition {
name=>"mailReturnPath", name=>"mailReturnPath",
label=>$i18n->get("mail return path"), label=>$i18n->get("mail return path"),
hoverHelp=>$i18n->get('mail return path help'), hoverHelp=>$i18n->get('mail return path help'),
defaultValue=>$session->setting->get("mailReturnPath") defaultValue=>$setting->get("mailReturnPath")
}); });
# misc # misc
push(@fields, { push(@fields, {
@ -281,7 +282,7 @@ sub definition {
name=>"preventProxyCache", name=>"preventProxyCache",
label=>$i18n->get(400), label=>$i18n->get(400),
hoverHelp=>$i18n->get('400 description'), hoverHelp=>$i18n->get('400 description'),
defaultValue=>$session->setting->get("preventProxyCache") defaultValue=>$setting->get("preventProxyCache")
}); });
push(@fields, { push(@fields, {
tab=>"misc", tab=>"misc",
@ -289,7 +290,7 @@ sub definition {
name=>"debugIp", name=>"debugIp",
label=>$i18n->get("debug ip"), label=>$i18n->get("debug ip"),
hoverHelp=>$i18n->get("debug ip description"), hoverHelp=>$i18n->get("debug ip description"),
defaultValue=>$session->setting->get("debugIp") defaultValue=>$setting->get("debugIp")
}); });
push(@fields, { push(@fields, {
tab=>"misc", tab=>"misc",
@ -297,7 +298,7 @@ sub definition {
name=>"showDebug", name=>"showDebug",
label=>$i18n->get(707), label=>$i18n->get(707),
hoverHelp=>$i18n->get('707 description'), hoverHelp=>$i18n->get('707 description'),
defaultValue=>$session->setting->get("showDebug") defaultValue=>$setting->get("showDebug")
}); });
push(@fields, { push(@fields, {
tab=>"misc", tab=>"misc",
@ -305,13 +306,13 @@ sub definition {
name=>"showPerformanceIndicators", name=>"showPerformanceIndicators",
label=>$i18n->get('show performance indicators'), label=>$i18n->get('show performance indicators'),
hoverHelp=>$i18n->get('show performance indicators description'), hoverHelp=>$i18n->get('show performance indicators description'),
defaultValue=>$session->setting->get("showPerformanceIndicators") defaultValue=>$setting->get("showPerformanceIndicators")
}); });
push(@fields, { push(@fields, {
tab=>"misc", tab=>"misc",
fieldType=>"selectBox", fieldType=>"selectBox",
name=>"hostToUse", name=>"hostToUse",
defaultValue=>[$session->setting->get("hostToUse")], defaultValue=>[$setting->get("hostToUse")],
options=>{ options=>{
sitename=>$i18n->get(1070), sitename=>$i18n->get(1070),
HTTP_HOST=>$i18n->get(1071) HTTP_HOST=>$i18n->get(1071)
@ -326,7 +327,7 @@ sub definition {
name=>"anonymousRegistration", name=>"anonymousRegistration",
label=>$i18n->get(118), label=>$i18n->get(118),
hoverHelp=>$i18n->get('118 description'), hoverHelp=>$i18n->get('118 description'),
defaultValue=>$session->setting->get("anonymousRegistration") defaultValue=>$setting->get("anonymousRegistration")
}); });
push(@fields, { push(@fields, {
tab=>"user", tab=>"user",
@ -334,7 +335,7 @@ sub definition {
name=>"automaticLDAPRegistration", name=>"automaticLDAPRegistration",
label=>$i18n->echo("Automatic LDAP Registration"), label=>$i18n->echo("Automatic LDAP Registration"),
hoverHelp=>$i18n->echo('When set to yes, a WebGUI user account will be created and the user logged in, if the credentials entered are validated by LDAP.'), hoverHelp=>$i18n->echo('When set to yes, a WebGUI user account will be created and the user logged in, if the credentials entered are validated by LDAP.'),
defaultValue=>$session->setting->get("automaticLDAPRegistration") defaultValue=>$setting->get("automaticLDAPRegistration")
}); });
push(@fields, { push(@fields, {
tab=>"user", tab=>"user",
@ -344,15 +345,35 @@ sub definition {
name=>"runOnRegistration", name=>"runOnRegistration",
label=>$i18n->get(559), label=>$i18n->get(559),
hoverHelp=>$i18n->get('559 description'), hoverHelp=>$i18n->get('559 description'),
defaultValue=>$session->setting->get("runOnRegistration") defaultValue=>$setting->get("runOnRegistration")
}); });
push(@fields, {
fieldType => "workflow",
tab => "user",
none => 1,
name => "runOnAdminCreateUser",
defaultValue => $setting->get("runOnAdminCreateUser"),
label => $i18n->get("run on admin create user"),
hoverHelp => $i18n->get("run on admin create user help"),
type => "WebGUI::User",
});
push(@fields, {
fieldType => "workflow",
tab => "user",
none => 1,
name => "runOnAdminUpdateUser",
defaultValue => $setting->get("runOnAdminUpdateUser"),
label => $i18n->get("run on admin update user"),
hoverHelp => $i18n->get("run on admin update user help"),
type => "WebGUI::User",
});
push(@fields, { push(@fields, {
tab=>"user", tab=>"user",
fieldType=>"yesNo", fieldType=>"yesNo",
name=>"useKarma", name=>"useKarma",
label=>$i18n->get(539), label=>$i18n->get(539),
hoverHelp=>$i18n->get('539 description'), hoverHelp=>$i18n->get('539 description'),
defaultValue=>$session->setting->get("useKarma") defaultValue=>$setting->get("useKarma")
}); });
push(@fields, { push(@fields, {
tab=>"user", tab=>"user",
@ -360,7 +381,7 @@ sub definition {
name=>"karmaPerLogin", name=>"karmaPerLogin",
label=>$i18n->get(540), label=>$i18n->get(540),
hoverHelp=>$i18n->get('540 description'), hoverHelp=>$i18n->get('540 description'),
defaultValue=>$session->setting->get("karmaPerLogin") defaultValue=>$setting->get("karmaPerLogin")
}); });
push(@fields, { push(@fields, {
tab=>"user", tab=>"user",
@ -368,7 +389,7 @@ sub definition {
name=>"sessionTimeout", name=>"sessionTimeout",
label=>$i18n->get(142), label=>$i18n->get(142),
hoverHelp=>$i18n->get('142 description'), hoverHelp=>$i18n->get('142 description'),
defaultValue=>$session->setting->get("sessionTimeout") defaultValue=>$setting->get("sessionTimeout")
}); });
push(@fields, { push(@fields, {
tab=>"user", tab=>"user",
@ -376,7 +397,7 @@ sub definition {
name=>"selfDeactivation", name=>"selfDeactivation",
label=>$i18n->get(885), label=>$i18n->get(885),
hoverHelp=>$i18n->get('885 description'), hoverHelp=>$i18n->get('885 description'),
defaultValue=>$session->setting->get("selfDeactivation") defaultValue=>$setting->get("selfDeactivation")
}); });
push(@fields, { push(@fields, {
tab => "user", tab => "user",
@ -384,7 +405,7 @@ sub definition {
name => "encryptLogin", name => "encryptLogin",
label => $i18n->get(1006), label => $i18n->get(1006),
hoverHelp => $i18n->get('1006 description'), hoverHelp => $i18n->get('1006 description'),
defaultValue=> $session->setting->get("encryptLogin"), defaultValue=> $setting->get("encryptLogin"),
}); });
push(@fields, { push(@fields, {
tab=>"user", tab=>"user",
@ -392,7 +413,7 @@ sub definition {
name=>"passiveProfilingEnabled", name=>"passiveProfilingEnabled",
label=>$i18n->get("Enable passive profiling"), label=>$i18n->get("Enable passive profiling"),
hoverHelp=>$i18n->get("Enable passive profiling description"), hoverHelp=>$i18n->get("Enable passive profiling description"),
defaultValue=>$session->setting->get("passiveProfilingEnabled"), defaultValue=>$setting->get("passiveProfilingEnabled"),
extras=>'onchange="alert(\''.$i18n->get("Illegal Warning").'\')" ' extras=>'onchange="alert(\''.$i18n->get("Illegal Warning").'\')" '
}); });
push(@fields, { push(@fields, {
@ -401,7 +422,7 @@ sub definition {
name=>"userInvitationsEnabled", name=>"userInvitationsEnabled",
label=>$i18n->get("Enable user invitations"), label=>$i18n->get("Enable user invitations"),
hoverHelp=>$i18n->get("Enable user invitations description"), hoverHelp=>$i18n->get("Enable user invitations description"),
defaultValue=>$session->setting->get("userInvitationsEnabled"), defaultValue=>$setting->get("userInvitationsEnabled"),
}); });
push(@fields, { push(@fields, {
tab=>"user", tab=>"user",
@ -409,7 +430,7 @@ sub definition {
name=>"userInvitationsEmailExists", name=>"userInvitationsEmailExists",
label=>$i18n->get("user invitations email exists"), label=>$i18n->get("user invitations email exists"),
hoverHelp=>$i18n->get("user invitations email exists description"), hoverHelp=>$i18n->get("user invitations email exists description"),
defaultValue=>$session->setting->get("userInvitationsEmailExists"), defaultValue=>$setting->get("userInvitationsEmailExists"),
}); });
push(@fields, { push(@fields, {
tab=>"user", tab=>"user",
@ -418,7 +439,7 @@ sub definition {
label=>$i18n->get('user email template'), label=>$i18n->get('user email template'),
hoverHelp=>$i18n->get('user email template description'), hoverHelp=>$i18n->get('user email template description'),
namespace=>"userInvite/Email", namespace=>"userInvite/Email",
defaultValue=>$session->setting->get("userInvitationsEmailTemplateId"), defaultValue=>$setting->get("userInvitationsEmailTemplateId"),
}); });
# auth settings # auth settings
my $options; my $options;
@ -432,7 +453,7 @@ sub definition {
options=>$options, options=>$options,
label=>$i18n->get(164), label=>$i18n->get(164),
hoverHelp=>$i18n->get('164 description'), hoverHelp=>$i18n->get('164 description'),
defaultValue=>[$session->setting->get("authMethod")], defaultValue=>[$setting->get("authMethod")],
}); });
# Administrative permissions # Administrative permissions
@ -470,7 +491,7 @@ sub definition {
name => $group, name => $group,
label => $i18n->get("settings $group label"), label => $i18n->get("settings $group label"),
hoverHelp => $i18n->get("settings $group hoverHelp"), hoverHelp => $i18n->get("settings $group hoverHelp"),
defaultValue => $session->setting->get($group), defaultValue => $setting->get($group),
}; };
} }

View file

@ -505,7 +505,30 @@ sub www_editUserSave {
$u->addToGroups(\@groups); $u->addToGroups(\@groups);
@groups = $session->form->group("groupsToDelete"); @groups = $session->form->group("groupsToDelete");
$u->deleteFromGroups(\@groups); $u->deleteFromGroups(\@groups);
# trigger workflows
if ($postedUserId eq "new") {
if ($session->setting->get("runOnAdminCreateUser")) {
WebGUI::Workflow::Instance->create($session, {
workflowId=>$session->setting->get("runOnAdminCreateUser"),
methodName=>"new",
className=>"WebGUI::User",
parameters=>$u->userId,
priority=>1
});
}
}
else {
if ($session->setting->get("runOnAdminUpdateUser")) {
WebGUI::Workflow::Instance->create($session, {
workflowId=>$session->setting->get("runOnAdminUpdateUser"),
methodName=>"new",
className=>"WebGUI::User",
parameters=>$u->userId,
priority=>1
});
}
}
# Display an error telling them the username they are trying to use is not available and suggest alternatives # Display an error telling them the username they are trying to use is not available and suggest alternatives
} else { } else {
$error = '<ul>' . sprintf($i18n->get(77), $postedUsername, $postedUsername, $postedUsername, $session->datetime->epochToHuman($session->datetime->time(),"%y")).'</ul>'; $error = '<ul>' . sprintf($i18n->get(77), $postedUsername, $postedUsername, $postedUsername, $session->datetime->epochToHuman($session->datetime->time(),"%y")).'</ul>';

View file

@ -1,6 +1,30 @@
package WebGUI::i18n::English::WebGUI; package WebGUI::i18n::English::WebGUI;
our $I18N = { our $I18N = {
'run on admin create user' => {
message => q|On Create User (Admin)|,
context => q|field in trigger manager|,
lastUpdated => 0,
},
'run on admin create user help' => {
message => q|Run when an admin creates a user.|,
context => q|help for field in trigger manager|,
lastUpdated => 0,
},
'run on admin update user' => {
message => q|On Update User (Admin)|,
context => q|field in trigger manager|,
lastUpdated => 0,
},
'run on admin update user help' => {
message => q|Run when an admin updates a user.|,
context => q|help for field in trigger manager|,
lastUpdated => 0,
},
'skip commit comments' => { 'skip commit comments' => {
message => q|Skip commit comments?|, message => q|Skip commit comments?|,
lastUpdated => 0, lastUpdated => 0,
@ -120,8 +144,8 @@ our $I18N = {
}, },
'559' => { '559' => {
message => q|Run On Registration|, message => q|On Create User (User)|,
lastUpdated => 1031514049 lastUpdated => 1185738895
}, },
'1049' => { '1049' => {