Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

annotationEditable()

Description

Check if an annotation can be editable (add/ edit/ remove) by the user

Parameters

ColumnTypeDefaultDescription
$annotation array

Return

boolean

Location

include/annotation_functions.php lines 215 to 231

Definition

 
function annotationEditable(array $annotation)
    {
    global 
$userref$annotate_read_only$annotate_crud_anonymous;

    if(
$annotate_read_only)
        {
        return 
false;
        }

    
// Anonymous users cannot edit by default. They can only edit if they are allowed CRUD operations
    
if(checkPermission_anonymoususer())
        {
        return 
$annotate_crud_anonymous && $userref == $annotation['user'];
        }

    return 
checkperm('a') || $userref == $annotation['user'];
    }

This article was last updated 26th November 2020 04:05 Europe/London time based on the source file dated 17th January 2020 16:11 Europe/London time.