Remove password protection.
For an album, add back view permissions on all subitems to everybody group.
Parameters:
|
GalleryItem |
$item: |
the item to unprotect |
|
boolean |
$useProgressBar: |
(default is false) |
|
|
&$item: |
|
API Tags:
Redefinition of:
- PasswordInterface_1_0::removePassword()
- Remove password protection for an item
Password protect an item.
Remove public view permissions from all subitems (if $item is an album) and add session based permissions; leave public core.view on $item itself so users can browse to it. Add an onLoadHandler that will redirect to get-password view when core.ShowItem is accessed but the user doesn't have resize/source permission. This view will grant permissions to the session when the correct password is given.
Parameters:
|
GalleryItem |
$item: |
the item to be protected |
|
string |
$password: |
password |
|
boolean |
$useProgressBar: |
(default is false) |
|
|
&$item: |
|
API Tags:
Redefinition of:
- PasswordInterface_1_0::setPassword()
- Password protect an item
PasswordHelper PasswordHelper(
)
|
|
Update permissions as needed for appropriate password status when moving an item.
Parameters:
API Tags:
Update permissions as needed for appropriate password status when adding an item.
Parameters:
API Tags:
GalleryStatus _adjustPermissionsForRemove(
&$item, int
$protectedBy, mixed
$protectedAncestor, mixed
$hiddenAncestor,
&$progressBar, GalleryItem
$item, array
$progressBar
)
|
|
Adjust permissions of item and subitems when removing a password
Parameters:
|
GalleryItem |
$item: |
|
|
int |
$protectedBy: |
id of formerly password protected item |
|
mixed |
$protectedAncestor: |
id of nearest password protected ancestor or false |
|
mixed |
$hiddenAncestor: |
id of nearest hidden ancestor or false |
|
array |
$progressBar: |
progress bar data or null |
|
|
&$item: |
|
|
|
&$progressBar: |
|
API Tags:
| Return: | a status code |
| Access: | private |
GalleryStatus _adjustPermissionsForSet(
&$item, int
$protectedBy, mixed
$protectedAncestor, mixed
$hiddenAncestor,
&$progressBar, [boolean
$inHidden = false], GalleryItem
$item, array
$progressBar
)
|
|
Adjust permissions of item and subitems when setting a password
Parameters:
|
GalleryItem |
$item: |
|
|
int |
$protectedBy: |
id of password protected item |
|
mixed |
$protectedAncestor: |
id of nearest password protected ancestor or false |
|
mixed |
$hiddenAncestor: |
id of nearest hidden ancestor or false |
|
array |
$progressBar: |
progress bar data or null |
|
boolean |
$inHidden: |
(optional) true when recursing into a hidden album |
|
|
&$item: |
|
|
|
&$progressBar: |
|
API Tags:
| Return: | a status code |
| Access: | private |
Check for nearest password/hidden ancestors of given item
Parameters:
API Tags:
| Return: | GalleryStatus a status code mixed id of nearest password protected ancestor or false mixed id of nearest hidden ancestor or false |
| Access: | private |