[Rt-commit] r11673 - in rt/branches/3.6-RELEASE: . lib/RT/Interface
falcone at bestpractical.com
falcone at bestpractical.com
Thu Apr 10 08:42:05 EDT 2008
Author: falcone
Date: Thu Apr 10 08:42:04 2008
New Revision: 11673
Modified:
rt/branches/3.6-RELEASE/ (props changed)
rt/branches/3.6-RELEASE/etc/RT_Config.pm.in
rt/branches/3.6-RELEASE/lib/RT/Interface/Web.pm
Log:
r31251 at ketch: falcone | 2008-04-10 08:28:06 -0400
* obey AutoCreate and create Unprivileged users
* document AutoCreate
Modified: rt/branches/3.6-RELEASE/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/3.6-RELEASE/etc/RT_Config.pm.in (original)
+++ rt/branches/3.6-RELEASE/etc/RT_Config.pm.in Thu Apr 10 08:42:04 2008
@@ -414,6 +414,13 @@
Set($WebExternalAuto , undef);
+# If $WebExternalAuto is true, this will be passed to User's
+# Create method. Use it to set defaults, such as creating
+# Unprivileged users with { Privileged => 0 }
+# Must be a hashref of arguments
+
+Set($AutoCreate, undef);
+
# $WebSessionClass is the class you wish to use for managing Sessions.
# It defaults to use your SQL database, but if you are using MySQL 3.x and
# plans to use non-ascii Queue names, uncomment and add this line to
Modified: rt/branches/3.6-RELEASE/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.6-RELEASE/lib/RT/Interface/Web.pm Thu Apr 10 08:42:04 2008
@@ -153,7 +153,12 @@
my %user_info;
- $user_info{'Privileged'} = 1;
+ # default to making Privileged users, even if they specify
+ # some other default Attributes
+ if (!$RT::AutoCreate ||
+ ( ref($RT::AutoCreate) && not exists $RT::AutoCreate->{Privileged})) {
+ $user_info{'Privileged'} = 1;
+ }
if ($^O !~ /^(?:riscos|MacOS|MSWin32|dos|os2)$/) {
# Populate fields with information from Unix /etc/passwd
More information about the Rt-commit
mailing list