[Koha-bugs] [Bug 29523] Add a way to prevent embedding objects that should not be allowed

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 14 08:45:09 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29523

--- Comment #41 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
+sub is_accessible_in_context {
+    my ( $self, $params ) = @_;
+
+    # FIXME? It felt tempting to return 0 instead
+    # but it would mean needing to explicitly add the 'user'
+    # param in all tests...
+    return 1
+      unless $params->{user};
+
+    my $consumer = $params->{user};
+    return $consumer->can_see_patron_infos($self);
+}

User, consumer, patron. Unclear.
The FIXME tells me that we should think a little bit more about what we really
want to do here?
We should obviously try to avoid adding it like this.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list