justinhunt / moodle-filter_poodll

The PoodLL Filter
6 stars 17 forks source link

added filter/poodll:use capability in order to limit access #30

Closed trevor-c closed 6 years ago

trevor-c commented 6 years ago

I've added a filter/poodll:use capability so that I am able to restrict access to a smaller number of instructors initially. It requires a version bump to register the capability.

With this in place, it is possible to prevent access from the Moodle Teacher role, and then create another specific PoodLL role that allows us to further control on who can access the filter (and then related plugins).

Thanks in advance for your consideration!

ishinegirl commented 6 years ago

Thanks a lot Trevor. The capability looks fine in general. I am just wondering where this would be applied. Are you thinking about restricting access to the recording? Or to the actual filter'ing of content? Some of the plugins have their own capabilities, though I suppose it might be possible for a single capability on the filter, to be used in each of the dependent plugins, eg the assignment submission. Can you just elaborate a little on your ideas for me?

Thanks again

ishinegirl commented 6 years ago

Actually I just checked your other pull requests now on assig sub and feedback, so I get the idea there. Just how to apply the check in filter really ..

trevor-c commented 6 years ago

My thinking is that with this capability added, I can control who has access to this specific filter. I work at a small-medium sized university and I'm reluctant to have the filter available to everyone, at least initially. With this capability enabled, I can remove access to it from within the default Teacher role, and then create a specific PoodLL role that allows the access. This way I can give a sub-group of users access to the filter and related plugins by giving them this additional PoodLL role, and the majority still won't be able to see or use them. Without the capability, the filter is available to everyone, which makes it difficult to introduce and support given our limited resources.

Basically I'm just trying to limit the access. By default the filter will be available to users with the Teacher role, but this capability gives those in my situation the ability to disable that and only allow access to a subset of users.

justinhunt commented 6 years ago

Thanks Trevor. I am merging it (and the other capabilities you added now). I think in the case of the filter, we still need to add "limit access" thing you suggested. That would take place in filter.php. Right now the capability is not checked anywhere.

Presumably we would use it so that text like: {POODLL:type=stopwatch} would not work unless you had permission. But players (audio and video) filtered from media fil links, should they also be limited? Do you have an opinion on that?

I have been a bit loathe to add database related code in filter.php for performance reasons. But i guess Moodle caches permission info so its ok. Anyway thats the next step.