https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26129
--- Comment #43 from David Cook <[email protected]> --- One last thought... On bug 39798 we're talking about the ability to turn off whole modules (like we already do for ERM and Preservation), but I think someone has said that permissions already fills that need. And that has got me thinking... how many system preferences should actually be permissions? -- For instance, "ExportCircHistory". Should the option to export patron checkouts be a system preference or a permission? Should that be a system preference or should it be a module specific "configuration"? In koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt, we use Template::Toolkit to write a value into Javascript: var exports_enabled = [% Koha.Preference('ExportCircHistory') ? 1 : 0 | html %]; In theory, shouldn't there be a Javascript object with a method like "logged_in_user.can_export_circ_history()" or something? In koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc we use the system preference to toggle display of some HTML. I suppose that too could instead be "logged_in_user.can_export_circ_history()" although it would need to be a Perl object not a Javascript object. I suppose the more cross-platform way to do that would be to use a Perl hash and turn it into a JSON object. In any case, ExportCircHistory ends up just being a presentation syspref as it isn't enforced in tools/export.pl. That actually makes you wonder if "ExportCircHistory" is an accurate name at all, or if it should be something like "can_see_circ_history_export". -- I think we'd be wise to start thinking about things more in terms of "actions" and "permissions". Is Subject A allowed to do Action B on Object C with Condition D? With the SMTP servers, surely there'd be permissions to create, read/view, update, and delete. (Of course, there are actions beyond simple CRUD as well. Maybe you want to send a test email via a SMTP server for instance.) Anyway, yet more food for thought... -- 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/
