How to prevent access to 'Files in no sets'?

Permalink
In Dashboard > File Manager, is there a way to prevent specific users or group from accessing 'Files in no sets'? I am using Advanced Permissions but could not find a way to do this.

I am using 5.6.3.2.

BlueFractals
 
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
Edit: I thought I had a way using advanced permissions but it didn't work when I tried it, I'll come back to this.
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
You could create an "unassigned" set and programmatically assign files not in a set to this set.

There are several events you can hook into for this:
on_file_added_to_set
on_file_removed_from_set
on_file_version_add
https://www.concrete5.org/documentation/developers/5.6/system/events...

Some examples of the scenarios you would code for:
File is uploaded but not assigned to a set, put it in "unassigned".
File that was in "unassigned" but given a set is removed from "unassigned".
File that was in a set, and all sets removed, put it in "unassigned".
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
I made a package that does just this: https://github.com/mitchray/mr_setless_files...

Now you can control "Setless" files with Advanced Permissions!
JohntheFish replied on at Permalink Reply
JohntheFish
The code on Github looks nicely done.
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
Thanks John!