zikula/core — pull request #761 by nmpetkov (2013-03-01 15:00:45+00:00)
Title: Correct result from SecurityUtil if passed unregistered user (uid=0)

SecurityUtil::checkPermission is rare used with passed UserId as 4-th parameter. One such place is check permissions in System permissions module. In this form now can be added possibility to check empty (uid=0) user.

In practice unregistered users are not with user Id=1 (userid=1 is member by default to Users group).

With changing 3 lines in SecurityUtil it is possible now to specify unregistered user, by passing 0 as 4-th parameter.

Particularly this change is needed to be possible current user (admin) to provide proper results when generating Newsletter in Newsletter module.

| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no