Load access levels independently of users
authorpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Wed, 29 Aug 2007 21:13:20 +0000 (21:13 +0000)
committerpdbogen <pdbogen@088b83a4-0077-4247-935c-42ec02c2848b>
Wed, 29 Aug 2007 21:13:20 +0000 (21:13 +0000)
git-svn-id: https://www.cernu.us/~pdbogen/svn/destult2@4 088b83a4-0077-4247-935c-42ec02c2848b

core.pl

diff --git a/core.pl b/core.pl
index e1093ae..a5cc58d 100644 (file)
--- a/core.pl
+++ b/core.pl
@@ -65,13 +65,18 @@ sub on_start {
                print( "CORE: No factoids found.\n" );
        }
 
-       if( -e "privs.yaml" && -e "access.yaml" ) {
-               $heap->{ 'privs' } = \%{ LoadFile( "privs.yaml" ) };
+       if( -e "access.yaml" ) {
                $heap->{ 'access' } = \%{ LoadFile( "access.yaml" ) };
+               print( "CORE: Access levels loaded.\n" );
+       } else {
+               $heap->{ 'access' } = { };
+       }
+
+       if( -e "privs.yaml" ) {
+               $heap->{ 'privs' } = \%{ LoadFile( "privs.yaml" ) };
                print( "CORE: Users loaded.\n" );
        } else {
                $heap->{ 'privs' } = { };
-               $heap->{ 'access' } = { };
                print( "CORE: No users found.\n" );
        }