public static ArrayList GetFoldersByUser( int PortalID, bool IncludeSecure, bool IncludeDatabase, bool AllowAccess, string Permissions )
        {
            FolderController objFolderController = new FolderController();
            ArrayList arrFolders = new ArrayList();
            UserInfo user = UserController.GetCurrentUserInfo();
            if( user.IsSuperUser )
            {
                //Get all the folders for the Portal
                ArrayList tempFolders = objFolderController.GetFoldersByPortal( PortalID );
                foreach( FolderInfo folder in tempFolders )
                {
                    bool canAdd = true;
                    if( folder.StorageLocation == (int)FolderController.StorageLocationTypes.DatabaseSecure )
                    {
                        canAdd = IncludeDatabase;
                    }
                    else if( folder.StorageLocation == (int)FolderController.StorageLocationTypes.SecureFileSystem )
                    {
                        canAdd = IncludeSecure;
                    }
                    if( canAdd )
                    {
                        arrFolders.Add( folder );
                    }
                }
            }
            else
            {
                //Get the folders for the Portal for the curent User
                arrFolders = objFolderController.GetFoldersByUser( PortalID, user.UserID, IncludeSecure, IncludeDatabase, AllowAccess, Permissions );
            }

            return arrFolders;
        }