Omeka_Db_Select_PublicPermissions
Package: Db
- class Omeka_Db_Select_PublicPermissions
Encapsulates the permissions check for a record that can be public or private.
- property _allPermission
protected
- property _selfPermission
protected
- property _currentUser
protected
- __construct($resource)
Create the permissions object and perform the ACL checks.
The permissions check relies on ‘showNotPublic’ and (optionally) ‘showSelfNotPublic’ privileges on the give resource.
- Parameters:
$resource (
string
) – ACL resource name to check.
- apply(Omeka_Db_Select $select, $alias, $ownerColumn = 'owner_id', $publicColumn = 'public')
Apply the permissions to an SQL select object.
- Parameters:
$select (
Omeka_Db_Select
) –$alias (
string
) – Table alias to query against$ownerColumn (
string
) – Optional column for checking for ownership. If falsy, the ownership check is skipped.$publicColumn (
string
) – Optional column for storing public status. The column must represent “public” status as the value 1.