projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
484fa24
)
add the small FS::CurrentUser::BootstrapUser class for... surprise... bootstrapping
author
ivan
<ivan>
Fri, 14 Jul 2006 01:42:42 +0000
(
01:42
+0000)
committer
ivan
<ivan>
Fri, 14 Jul 2006 01:42:42 +0000
(
01:42
+0000)
FS/FS/CurrentUser.pm
patch
|
blob
|
history
FS/FS/UID.pm
patch
|
blob
|
history
diff --git
a/FS/FS/CurrentUser.pm
b/FS/FS/CurrentUser.pm
index
37ed359
..
a2dfd71
100644
(file)
--- a/
FS/FS/CurrentUser.pm
+++ b/
FS/FS/CurrentUser.pm
@@
-21,7
+21,9
@@
FS::CurrentUser - Package representing the current user
sub load_user {
my( $class, $user ) = @_; #, $pass
sub load_user {
my( $class, $user ) = @_; #, $pass
- return "" if $upgrade_hack;
+ if ( $upgrade_hack ) {
+ return new FS::CurrentUser::BootstrapUser;
+ }
#return "" if $user =~ /^fs_(queue|selfservice)$/;
#return "" if $user =~ /^fs_(queue|selfservice)$/;
@@
-49,5
+51,16
@@
Creepy crawlies
=cut
=cut
+package FS::CurrentUser::BootstrapUser;
+
+sub new {
+ my $proto = shift;
+ my $class = ref($proto) || $proto;
+ my $self = {};
+ bless ($self, $class);
+}
+
+sub AUTOLOAD { 1 };
+
1;
1;
diff --git
a/FS/FS/UID.pm
b/FS/FS/UID.pm
index
1f51ca6
..
0d32002
100644
(file)
--- a/
FS/FS/UID.pm
+++ b/
FS/FS/UID.pm
@@
-74,7
+74,7
@@
sub forksuidsetup {
$user = shift;
if ( $FS::CurrentUser::upgrade_hack ) {
$user = shift;
if ( $FS::CurrentUser::upgrade_hack ) {
- $user = '';
+ $user = '
fs_bootstrap
';
} else {
croak "fatal: adminsuidsetup called without arguements" unless $user;
} else {
croak "fatal: adminsuidsetup called without arguements" unless $user;