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

--- Comment #45 from Martin Renvoize (ashimema) 
<[email protected]> ---
(In reply to Marcel de Rooy from comment #44)
> Koha::Patron
> 
> +sub permissions {
> +    my ($self) = @_;
> +
> +    my $dbh = C4::Context->dbh;
> +    my $sth = $dbh->prepare("SELECT bit, flag FROM userflags ORDER BY bit");
> +    $sth->execute();
> 
> The idea of Koha::Object[s] was to remove SQL statements. So we should not
> just add them here.
> We could create a simple Koha object for userflags and permissions?
> Or we can use Koha::Database->new->schema->resultset(..) as is done
> elsewhere in this module too.

We have Koha::Auth::Permissions already, though I'm not entirely sold on it's
semantics either, to be honest.  I'd be tempted to start migrating the perms
code into Koha::Patron or possibly Koha::Patron::Permissions?

I do think there's more work needed here, regardless.. I'm going to post a
couple of follow-ups shortly and maybe the rest can be submitted as follow-up
bugs

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to