Completed the view of indicators page, linked to django admin interface to edit them. Removed all other models from admin interface for now - need to make sure this is ok. Haven't linked db fields into import checks yet. Refs #510
Is it ok to just make use of the Django backend admin interface, or should I not be so lazy and add in my own form?
@dplatten @tcdewit @LuukO comments?
It looks good to me. I don't mind that you're using the backend interface, providing that the documentation about how to change these settings reflects this.
I just had a look and agree with David. Tthe Django interface is clear enough to keep it that way. And of course it is prettier if you add your own form, but I don't think it is a necessity.
I'll add in the code to make it actually use those values and add some documentation next.
Tim de Wit
I agree as well... however, wouldn't it be better to use explicit regexp or wildcards for matching? That might solve the problem of test studies matching a real patient (at least there's more control for the admin-user on the matching part)?
Good point @tcdewit. Allowing regular expressions scares me a little - for trying to document how to use it if for no other reason!
Maybe using fnmatch would be a good idea though - that would allow for wildcard matching that most people are familiar with.
Tim de Wit
fnmatch would be sufficient I think!
First attempt to implement using patterns from the database with fnmatch(). Refs #510
Looks great! For testing replicating behaviour of release 0.7.4 administrator rights are required but I trust you implemented it correctly.
Is that what we want though? "Opt-in" instead of "opt-out" by default? I could imagine some people might overlook this during an upgrade so perhaps behavior should stay the same by default and configurable for those who took the effort to actually read the changelog? :)
Removed alternative admin menus, hopefully all redundant now. Formatted other uses of new config menu. Refs #510
Now tests for admin group in more places and removes links if not admin. Adds messages to confirm success and error message if user still manages to craft correct URL. Refs #510, credit to @tcdewit for reminding me to check!
@tcdewit thanks for prompting me to look at what it looks like without admin rights, and apologies for not giving you any! Wasn't my intention, and fixed now.
I have added a username of demo demotesting too to enable us to see whait it looks like as view only.
I think I'd rather have opt-out by default, but I think that would mean adding in data migrations which I had shied away from so as to not make the upgrade any more difficult, but now you've made me look at the instructions it doesn't look so hard...
Looks like a data migration would turn a simple migration into a complex one with scary merges because we can't know what migrations precede it, and it would depend on what I'm hoping will be an auto migration.
I have an idea though for some messages to pop up when an admin logs in that can be implemented or cleared as the admin wishes...
Not really related to ref #510, but it has been bothering me. @dplatten - any objection to removing chart message when not logged in?