AnnotationLabelPolicy
class AnnotationLabelPolicy extends CachedPolicy
Traits
Constants
TIME |
Time to store the cached values. (is irrelevant for the array store) |
Properties
protected Repository | $cache | The cache instance to use for caching policies. |
from CachedPolicy |
Methods
Wrapper for the Cache::remember function of the array cache.
Determine if the user can edit the given annotation label.
Determine if the user can delete the given annotation label.
Details
in
CachedPolicy at line 31
__construct()
Create a new CachedPolicy.
in
CachedPolicy at line 43
mixed
remember(string $key, callable $callback)
Wrapper for the Cache::remember function of the array cache.
at line 26
bool
update(User $user, AnnotationLabel $annotationLabel)
Determine if the user can edit the given annotation label.
If the user created the annotation label, they must be editor or admin of one of the projects, the annotation belongs to. If another user created it, they must be admin of one of the projects.
at line 76
bool
destroy(User $user, AnnotationLabel $annotationLabel)
Determine if the user can delete the given annotation label.
If the user created the annotation label, they must be editor or admin of one of the projects, the annotation belongs to. If another user created it, they must be admin of one of the projects.