FindAllPagesWithCriteria not getting the pages the users hasn't access to

Vote:
 

Hi,

I'm a bit puzzled over how the FindAllPagesWithCriteria function works. This is supposed to get all the pages, regardless if the users has access rights to it or not. This doesn't work at all for me, only the pages that the users has access right to gets collected, so FindPagesWithCriteria and FindAllPagesWithCriteria get exactly the same collection of pages.

The reason that I wan't to get hold of pages that a user doesn't have access right to, is that i wan't to show values from some of the properties on these, if the page is tagged (using categories) in a certain way.

Anyone that has had the same problem with FindAllPagesWithCriteria?

// Regards, Torbjörn

#49459
Mar 17, 2011 18:54
Vote:
 

This is a known bug, fixed in CMS 6 R2. See bug #55341 in the bug list.

#49460
Mar 17, 2011 20:27
Vote:
 

Hi,

Thanks for the info, but this isn't a scheduled job, so I unfortunally don't think this applies to this example, since the bug description said that the pages were collected if the job was run manually.

#49479
Mar 18, 2011 16:41
Vote:
 

If the job is started manually its from admin mode and the user most probably has full access to all pages.

Edit: Removed accidental code formatting.

#49481
Edited, Mar 18, 2011 16:58
Vote:
 

Yeah, that sounds correct. Just have to wait for R2 then....

 

#49505
Mar 22, 2011 9:24
Vote:
 

I've encountered this just now. FindAllPagesWithCriteria return 10 items for one user and 11 for another. It's not code inside a scheduled job.

FindAllPagesWithCriteria seems to work as expected when it comes to returning pages waiting for it's start/stop publish datetime to occur though. So it's not completely worthless in CMS 6 R1.

#50895
Edited, May 16, 2011 16:50
Vote:
 

It can happen outside scheduled jobs too, the bug is that it doesn't ignore access rights as it should. A scheduled job started by the scheduler is run as an anonymous user while when started manually it will run as the logged in administrator, that's why it might differ greatly in scheduled jobs in particular but the problem is not isolated to scheduled jobs.

#50903
May 17, 2011 6:35
Vote:
 

Yes, since scheduled jobs was mentioned before I just thought I'd clarify...

Have you confirmed that the bug is fixed in 6 R2?

#50907
May 17, 2011 8:37
Vote:
 

Ah, my double clarification wasn't uncalled for then :) I haven't checked R2, please post back your results if you do.

#50908
May 17, 2011 8:38
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.